#[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 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()
}
}
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 VpcAttachment {
pub attachment: std::option::Option<crate::model::Attachment>,
pub subnet_arns: std::option::Option<std::vec::Vec<std::string::String>>,
pub options: std::option::Option<crate::model::VpcOptions>,
}
impl VpcAttachment {
pub fn attachment(&self) -> std::option::Option<&crate::model::Attachment> {
self.attachment.as_ref()
}
pub fn subnet_arns(&self) -> std::option::Option<&[std::string::String]> {
self.subnet_arns.as_deref()
}
pub fn options(&self) -> std::option::Option<&crate::model::VpcOptions> {
self.options.as_ref()
}
}
impl std::fmt::Debug for VpcAttachment {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("VpcAttachment");
formatter.field("attachment", &self.attachment);
formatter.field("subnet_arns", &self.subnet_arns);
formatter.field("options", &self.options);
formatter.finish()
}
}
pub mod vpc_attachment {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) attachment: std::option::Option<crate::model::Attachment>,
pub(crate) subnet_arns: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) options: std::option::Option<crate::model::VpcOptions>,
}
impl Builder {
pub fn attachment(mut self, input: crate::model::Attachment) -> Self {
self.attachment = Some(input);
self
}
pub fn set_attachment(
mut self,
input: std::option::Option<crate::model::Attachment>,
) -> Self {
self.attachment = input;
self
}
pub fn subnet_arns(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.subnet_arns.unwrap_or_default();
v.push(input.into());
self.subnet_arns = Some(v);
self
}
pub fn set_subnet_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.subnet_arns = input;
self
}
pub fn options(mut self, input: crate::model::VpcOptions) -> Self {
self.options = Some(input);
self
}
pub fn set_options(mut self, input: std::option::Option<crate::model::VpcOptions>) -> Self {
self.options = input;
self
}
pub fn build(self) -> crate::model::VpcAttachment {
crate::model::VpcAttachment {
attachment: self.attachment,
subnet_arns: self.subnet_arns,
options: self.options,
}
}
}
}
impl VpcAttachment {
pub fn builder() -> crate::model::vpc_attachment::Builder {
crate::model::vpc_attachment::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct VpcOptions {
pub ipv6_support: bool,
}
impl VpcOptions {
pub fn ipv6_support(&self) -> bool {
self.ipv6_support
}
}
impl std::fmt::Debug for VpcOptions {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("VpcOptions");
formatter.field("ipv6_support", &self.ipv6_support);
formatter.finish()
}
}
pub mod vpc_options {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ipv6_support: std::option::Option<bool>,
}
impl Builder {
pub fn ipv6_support(mut self, input: bool) -> Self {
self.ipv6_support = Some(input);
self
}
pub fn set_ipv6_support(mut self, input: std::option::Option<bool>) -> Self {
self.ipv6_support = input;
self
}
pub fn build(self) -> crate::model::VpcOptions {
crate::model::VpcOptions {
ipv6_support: self.ipv6_support.unwrap_or_default(),
}
}
}
}
impl VpcOptions {
pub fn builder() -> crate::model::vpc_options::Builder {
crate::model::vpc_options::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Attachment {
pub core_network_id: std::option::Option<std::string::String>,
pub core_network_arn: std::option::Option<std::string::String>,
pub attachment_id: std::option::Option<std::string::String>,
pub owner_account_id: std::option::Option<std::string::String>,
pub attachment_type: std::option::Option<crate::model::AttachmentType>,
pub state: std::option::Option<crate::model::AttachmentState>,
pub edge_location: std::option::Option<std::string::String>,
pub resource_arn: std::option::Option<std::string::String>,
pub attachment_policy_rule_number: std::option::Option<i32>,
pub segment_name: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub proposed_segment_change: std::option::Option<crate::model::ProposedSegmentChange>,
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
pub updated_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl Attachment {
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn core_network_arn(&self) -> std::option::Option<&str> {
self.core_network_arn.as_deref()
}
pub fn attachment_id(&self) -> std::option::Option<&str> {
self.attachment_id.as_deref()
}
pub fn owner_account_id(&self) -> std::option::Option<&str> {
self.owner_account_id.as_deref()
}
pub fn attachment_type(&self) -> std::option::Option<&crate::model::AttachmentType> {
self.attachment_type.as_ref()
}
pub fn state(&self) -> std::option::Option<&crate::model::AttachmentState> {
self.state.as_ref()
}
pub fn edge_location(&self) -> std::option::Option<&str> {
self.edge_location.as_deref()
}
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn attachment_policy_rule_number(&self) -> std::option::Option<i32> {
self.attachment_policy_rule_number
}
pub fn segment_name(&self) -> std::option::Option<&str> {
self.segment_name.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn proposed_segment_change(
&self,
) -> std::option::Option<&crate::model::ProposedSegmentChange> {
self.proposed_segment_change.as_ref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
}
impl std::fmt::Debug for Attachment {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Attachment");
formatter.field("core_network_id", &self.core_network_id);
formatter.field("core_network_arn", &self.core_network_arn);
formatter.field("attachment_id", &self.attachment_id);
formatter.field("owner_account_id", &self.owner_account_id);
formatter.field("attachment_type", &self.attachment_type);
formatter.field("state", &self.state);
formatter.field("edge_location", &self.edge_location);
formatter.field("resource_arn", &self.resource_arn);
formatter.field(
"attachment_policy_rule_number",
&self.attachment_policy_rule_number,
);
formatter.field("segment_name", &self.segment_name);
formatter.field("tags", &self.tags);
formatter.field("proposed_segment_change", &self.proposed_segment_change);
formatter.field("created_at", &self.created_at);
formatter.field("updated_at", &self.updated_at);
formatter.finish()
}
}
pub mod attachment {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_id: std::option::Option<std::string::String>,
pub(crate) core_network_arn: std::option::Option<std::string::String>,
pub(crate) attachment_id: std::option::Option<std::string::String>,
pub(crate) owner_account_id: std::option::Option<std::string::String>,
pub(crate) attachment_type: std::option::Option<crate::model::AttachmentType>,
pub(crate) state: std::option::Option<crate::model::AttachmentState>,
pub(crate) edge_location: std::option::Option<std::string::String>,
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) attachment_policy_rule_number: std::option::Option<i32>,
pub(crate) segment_name: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) proposed_segment_change:
std::option::Option<crate::model::ProposedSegmentChange>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) updated_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn core_network_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_arn = Some(input.into());
self
}
pub fn set_core_network_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_arn = input;
self
}
pub fn attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.attachment_id = Some(input.into());
self
}
pub fn set_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.attachment_id = input;
self
}
pub fn owner_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_account_id = Some(input.into());
self
}
pub fn set_owner_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owner_account_id = input;
self
}
pub fn attachment_type(mut self, input: crate::model::AttachmentType) -> Self {
self.attachment_type = Some(input);
self
}
pub fn set_attachment_type(
mut self,
input: std::option::Option<crate::model::AttachmentType>,
) -> Self {
self.attachment_type = input;
self
}
pub fn state(mut self, input: crate::model::AttachmentState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::AttachmentState>,
) -> Self {
self.state = input;
self
}
pub fn edge_location(mut self, input: impl Into<std::string::String>) -> Self {
self.edge_location = Some(input.into());
self
}
pub fn set_edge_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.edge_location = input;
self
}
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn attachment_policy_rule_number(mut self, input: i32) -> Self {
self.attachment_policy_rule_number = Some(input);
self
}
pub fn set_attachment_policy_rule_number(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.attachment_policy_rule_number = input;
self
}
pub fn segment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.segment_name = Some(input.into());
self
}
pub fn set_segment_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.segment_name = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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 proposed_segment_change(
mut self,
input: crate::model::ProposedSegmentChange,
) -> Self {
self.proposed_segment_change = Some(input);
self
}
pub fn set_proposed_segment_change(
mut self,
input: std::option::Option<crate::model::ProposedSegmentChange>,
) -> Self {
self.proposed_segment_change = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
pub fn updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.updated_at = Some(input);
self
}
pub fn set_updated_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.updated_at = input;
self
}
pub fn build(self) -> crate::model::Attachment {
crate::model::Attachment {
core_network_id: self.core_network_id,
core_network_arn: self.core_network_arn,
attachment_id: self.attachment_id,
owner_account_id: self.owner_account_id,
attachment_type: self.attachment_type,
state: self.state,
edge_location: self.edge_location,
resource_arn: self.resource_arn,
attachment_policy_rule_number: self.attachment_policy_rule_number,
segment_name: self.segment_name,
tags: self.tags,
proposed_segment_change: self.proposed_segment_change,
created_at: self.created_at,
updated_at: self.updated_at,
}
}
}
}
impl Attachment {
pub fn builder() -> crate::model::attachment::Builder {
crate::model::attachment::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProposedSegmentChange {
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub attachment_policy_rule_number: std::option::Option<i32>,
pub segment_name: std::option::Option<std::string::String>,
}
impl ProposedSegmentChange {
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn attachment_policy_rule_number(&self) -> std::option::Option<i32> {
self.attachment_policy_rule_number
}
pub fn segment_name(&self) -> std::option::Option<&str> {
self.segment_name.as_deref()
}
}
impl std::fmt::Debug for ProposedSegmentChange {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ProposedSegmentChange");
formatter.field("tags", &self.tags);
formatter.field(
"attachment_policy_rule_number",
&self.attachment_policy_rule_number,
);
formatter.field("segment_name", &self.segment_name);
formatter.finish()
}
}
pub mod proposed_segment_change {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) attachment_policy_rule_number: std::option::Option<i32>,
pub(crate) segment_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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 attachment_policy_rule_number(mut self, input: i32) -> Self {
self.attachment_policy_rule_number = Some(input);
self
}
pub fn set_attachment_policy_rule_number(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.attachment_policy_rule_number = input;
self
}
pub fn segment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.segment_name = Some(input.into());
self
}
pub fn set_segment_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.segment_name = input;
self
}
pub fn build(self) -> crate::model::ProposedSegmentChange {
crate::model::ProposedSegmentChange {
tags: self.tags,
attachment_policy_rule_number: self.attachment_policy_rule_number,
segment_name: self.segment_name,
}
}
}
}
impl ProposedSegmentChange {
pub fn builder() -> crate::model::proposed_segment_change::Builder {
crate::model::proposed_segment_change::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 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()
}
}
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 AttachmentState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Creating,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] PendingAttachmentAcceptance,
#[allow(missing_docs)] PendingNetworkUpdate,
#[allow(missing_docs)] PendingTagAcceptance,
#[allow(missing_docs)] Rejected,
#[allow(missing_docs)] Updating,
Unknown(String),
}
impl std::convert::From<&str> for AttachmentState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => AttachmentState::Available,
"CREATING" => AttachmentState::Creating,
"DELETING" => AttachmentState::Deleting,
"FAILED" => AttachmentState::Failed,
"PENDING_ATTACHMENT_ACCEPTANCE" => AttachmentState::PendingAttachmentAcceptance,
"PENDING_NETWORK_UPDATE" => AttachmentState::PendingNetworkUpdate,
"PENDING_TAG_ACCEPTANCE" => AttachmentState::PendingTagAcceptance,
"REJECTED" => AttachmentState::Rejected,
"UPDATING" => AttachmentState::Updating,
other => AttachmentState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AttachmentState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AttachmentState::from(s))
}
}
impl AttachmentState {
pub fn as_str(&self) -> &str {
match self {
AttachmentState::Available => "AVAILABLE",
AttachmentState::Creating => "CREATING",
AttachmentState::Deleting => "DELETING",
AttachmentState::Failed => "FAILED",
AttachmentState::PendingAttachmentAcceptance => "PENDING_ATTACHMENT_ACCEPTANCE",
AttachmentState::PendingNetworkUpdate => "PENDING_NETWORK_UPDATE",
AttachmentState::PendingTagAcceptance => "PENDING_TAG_ACCEPTANCE",
AttachmentState::Rejected => "REJECTED",
AttachmentState::Updating => "UPDATING",
AttachmentState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"AVAILABLE",
"CREATING",
"DELETING",
"FAILED",
"PENDING_ATTACHMENT_ACCEPTANCE",
"PENDING_NETWORK_UPDATE",
"PENDING_TAG_ACCEPTANCE",
"REJECTED",
"UPDATING",
]
}
}
impl AsRef<str> for AttachmentState {
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 AttachmentType {
#[allow(missing_docs)] Connect,
#[allow(missing_docs)] SiteToSiteVpn,
#[allow(missing_docs)] Vpc,
Unknown(String),
}
impl std::convert::From<&str> for AttachmentType {
fn from(s: &str) -> Self {
match s {
"CONNECT" => AttachmentType::Connect,
"SITE_TO_SITE_VPN" => AttachmentType::SiteToSiteVpn,
"VPC" => AttachmentType::Vpc,
other => AttachmentType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AttachmentType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AttachmentType::from(s))
}
}
impl AttachmentType {
pub fn as_str(&self) -> &str {
match self {
AttachmentType::Connect => "CONNECT",
AttachmentType::SiteToSiteVpn => "SITE_TO_SITE_VPN",
AttachmentType::Vpc => "VPC",
AttachmentType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["CONNECT", "SITE_TO_SITE_VPN", "VPC"]
}
}
impl AsRef<str> for AttachmentType {
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::DateTime>,
pub state: std::option::Option<crate::model::SiteState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Site {
pub fn site_id(&self) -> std::option::Option<&str> {
self.site_id.as_deref()
}
pub fn site_arn(&self) -> std::option::Option<&str> {
self.site_arn.as_deref()
}
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn location(&self) -> std::option::Option<&crate::model::Location> {
self.location.as_ref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn state(&self) -> std::option::Option<&crate::model::SiteState> {
self.state.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
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::DateTime>,
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::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> 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: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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()
}
}
#[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 Location {
pub fn address(&self) -> std::option::Option<&str> {
self.address.as_deref()
}
pub fn latitude(&self) -> std::option::Option<&str> {
self.latitude.as_deref()
}
pub fn longitude(&self) -> std::option::Option<&str> {
self.longitude.as_deref()
}
}
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::DateTime>,
pub state: std::option::Option<crate::model::LinkState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Link {
pub fn link_id(&self) -> std::option::Option<&str> {
self.link_id.as_deref()
}
pub fn link_arn(&self) -> std::option::Option<&str> {
self.link_arn.as_deref()
}
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn site_id(&self) -> std::option::Option<&str> {
self.site_id.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&str> {
self.r#type.as_deref()
}
pub fn bandwidth(&self) -> std::option::Option<&crate::model::Bandwidth> {
self.bandwidth.as_ref()
}
pub fn provider(&self) -> std::option::Option<&str> {
self.provider.as_deref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn state(&self) -> std::option::Option<&crate::model::LinkState> {
self.state.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
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::DateTime>,
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::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> 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: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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 Bandwidth {
pub fn upload_speed(&self) -> std::option::Option<i32> {
self.upload_speed
}
pub fn download_speed(&self) -> std::option::Option<i32> {
self.download_speed
}
}
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::DateTime>,
pub state: std::option::Option<crate::model::GlobalNetworkState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl GlobalNetwork {
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn global_network_arn(&self) -> std::option::Option<&str> {
self.global_network_arn.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn state(&self) -> std::option::Option<&crate::model::GlobalNetworkState> {
self.state.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
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::DateTime>,
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::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> 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: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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::DateTime>,
pub state: std::option::Option<crate::model::DeviceState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Device {
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
pub fn device_arn(&self) -> std::option::Option<&str> {
self.device_arn.as_deref()
}
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn aws_location(&self) -> std::option::Option<&crate::model::AwsLocation> {
self.aws_location.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&str> {
self.r#type.as_deref()
}
pub fn vendor(&self) -> std::option::Option<&str> {
self.vendor.as_deref()
}
pub fn model(&self) -> std::option::Option<&str> {
self.model.as_deref()
}
pub fn serial_number(&self) -> std::option::Option<&str> {
self.serial_number.as_deref()
}
pub fn location(&self) -> std::option::Option<&crate::model::Location> {
self.location.as_ref()
}
pub fn site_id(&self) -> std::option::Option<&str> {
self.site_id.as_deref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn state(&self) -> std::option::Option<&crate::model::DeviceState> {
self.state.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
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::DateTime>,
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::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> 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: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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 AwsLocation {
pub fn zone(&self) -> std::option::Option<&str> {
self.zone.as_deref()
}
pub fn subnet_arn(&self) -> std::option::Option<&str> {
self.subnet_arn.as_deref()
}
}
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 CoreNetwork {
pub global_network_id: std::option::Option<std::string::String>,
pub core_network_id: std::option::Option<std::string::String>,
pub core_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::DateTime>,
pub state: std::option::Option<crate::model::CoreNetworkState>,
pub segments: std::option::Option<std::vec::Vec<crate::model::CoreNetworkSegment>>,
pub edges: std::option::Option<std::vec::Vec<crate::model::CoreNetworkEdge>>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CoreNetwork {
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn core_network_arn(&self) -> std::option::Option<&str> {
self.core_network_arn.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn state(&self) -> std::option::Option<&crate::model::CoreNetworkState> {
self.state.as_ref()
}
pub fn segments(&self) -> std::option::Option<&[crate::model::CoreNetworkSegment]> {
self.segments.as_deref()
}
pub fn edges(&self) -> std::option::Option<&[crate::model::CoreNetworkEdge]> {
self.edges.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CoreNetwork {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetwork");
formatter.field("global_network_id", &self.global_network_id);
formatter.field("core_network_id", &self.core_network_id);
formatter.field("core_network_arn", &self.core_network_arn);
formatter.field("description", &self.description);
formatter.field("created_at", &self.created_at);
formatter.field("state", &self.state);
formatter.field("segments", &self.segments);
formatter.field("edges", &self.edges);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod core_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) core_network_id: std::option::Option<std::string::String>,
pub(crate) core_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::DateTime>,
pub(crate) state: std::option::Option<crate::model::CoreNetworkState>,
pub(crate) segments: std::option::Option<std::vec::Vec<crate::model::CoreNetworkSegment>>,
pub(crate) edges: std::option::Option<std::vec::Vec<crate::model::CoreNetworkEdge>>,
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 core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn core_network_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_arn = Some(input.into());
self
}
pub fn set_core_network_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_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::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
pub fn state(mut self, input: crate::model::CoreNetworkState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::CoreNetworkState>,
) -> Self {
self.state = input;
self
}
pub fn segments(mut self, input: crate::model::CoreNetworkSegment) -> Self {
let mut v = self.segments.unwrap_or_default();
v.push(input);
self.segments = Some(v);
self
}
pub fn set_segments(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CoreNetworkSegment>>,
) -> Self {
self.segments = input;
self
}
pub fn edges(mut self, input: crate::model::CoreNetworkEdge) -> Self {
let mut v = self.edges.unwrap_or_default();
v.push(input);
self.edges = Some(v);
self
}
pub fn set_edges(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CoreNetworkEdge>>,
) -> Self {
self.edges = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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::CoreNetwork {
crate::model::CoreNetwork {
global_network_id: self.global_network_id,
core_network_id: self.core_network_id,
core_network_arn: self.core_network_arn,
description: self.description,
created_at: self.created_at,
state: self.state,
segments: self.segments,
edges: self.edges,
tags: self.tags,
}
}
}
}
impl CoreNetwork {
pub fn builder() -> crate::model::core_network::Builder {
crate::model::core_network::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CoreNetworkEdge {
pub edge_location: std::option::Option<std::string::String>,
pub asn: std::option::Option<i64>,
pub inside_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl CoreNetworkEdge {
pub fn edge_location(&self) -> std::option::Option<&str> {
self.edge_location.as_deref()
}
pub fn asn(&self) -> std::option::Option<i64> {
self.asn
}
pub fn inside_cidr_blocks(&self) -> std::option::Option<&[std::string::String]> {
self.inside_cidr_blocks.as_deref()
}
}
impl std::fmt::Debug for CoreNetworkEdge {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetworkEdge");
formatter.field("edge_location", &self.edge_location);
formatter.field("asn", &self.asn);
formatter.field("inside_cidr_blocks", &self.inside_cidr_blocks);
formatter.finish()
}
}
pub mod core_network_edge {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) edge_location: std::option::Option<std::string::String>,
pub(crate) asn: std::option::Option<i64>,
pub(crate) inside_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn edge_location(mut self, input: impl Into<std::string::String>) -> Self {
self.edge_location = Some(input.into());
self
}
pub fn set_edge_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.edge_location = input;
self
}
pub fn asn(mut self, input: i64) -> Self {
self.asn = Some(input);
self
}
pub fn set_asn(mut self, input: std::option::Option<i64>) -> Self {
self.asn = input;
self
}
pub fn inside_cidr_blocks(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.inside_cidr_blocks.unwrap_or_default();
v.push(input.into());
self.inside_cidr_blocks = Some(v);
self
}
pub fn set_inside_cidr_blocks(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inside_cidr_blocks = input;
self
}
pub fn build(self) -> crate::model::CoreNetworkEdge {
crate::model::CoreNetworkEdge {
edge_location: self.edge_location,
asn: self.asn,
inside_cidr_blocks: self.inside_cidr_blocks,
}
}
}
}
impl CoreNetworkEdge {
pub fn builder() -> crate::model::core_network_edge::Builder {
crate::model::core_network_edge::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CoreNetworkSegment {
pub name: std::option::Option<std::string::String>,
pub edge_locations: std::option::Option<std::vec::Vec<std::string::String>>,
pub shared_segments: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl CoreNetworkSegment {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn edge_locations(&self) -> std::option::Option<&[std::string::String]> {
self.edge_locations.as_deref()
}
pub fn shared_segments(&self) -> std::option::Option<&[std::string::String]> {
self.shared_segments.as_deref()
}
}
impl std::fmt::Debug for CoreNetworkSegment {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetworkSegment");
formatter.field("name", &self.name);
formatter.field("edge_locations", &self.edge_locations);
formatter.field("shared_segments", &self.shared_segments);
formatter.finish()
}
}
pub mod core_network_segment {
#[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) edge_locations: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) shared_segments: std::option::Option<std::vec::Vec<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 edge_locations(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.edge_locations.unwrap_or_default();
v.push(input.into());
self.edge_locations = Some(v);
self
}
pub fn set_edge_locations(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.edge_locations = input;
self
}
pub fn shared_segments(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.shared_segments.unwrap_or_default();
v.push(input.into());
self.shared_segments = Some(v);
self
}
pub fn set_shared_segments(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.shared_segments = input;
self
}
pub fn build(self) -> crate::model::CoreNetworkSegment {
crate::model::CoreNetworkSegment {
name: self.name,
edge_locations: self.edge_locations,
shared_segments: self.shared_segments,
}
}
}
}
impl CoreNetworkSegment {
pub fn builder() -> crate::model::core_network_segment::Builder {
crate::model::core_network_segment::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 CoreNetworkState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Creating,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Updating,
Unknown(String),
}
impl std::convert::From<&str> for CoreNetworkState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => CoreNetworkState::Available,
"CREATING" => CoreNetworkState::Creating,
"DELETING" => CoreNetworkState::Deleting,
"UPDATING" => CoreNetworkState::Updating,
other => CoreNetworkState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CoreNetworkState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CoreNetworkState::from(s))
}
}
impl CoreNetworkState {
pub fn as_str(&self) -> &str {
match self {
CoreNetworkState::Available => "AVAILABLE",
CoreNetworkState::Creating => "CREATING",
CoreNetworkState::Deleting => "DELETING",
CoreNetworkState::Updating => "UPDATING",
CoreNetworkState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "CREATING", "DELETING", "UPDATING"]
}
}
impl AsRef<str> for CoreNetworkState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[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::DateTime>,
pub state: std::option::Option<crate::model::ConnectionState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Connection {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn connection_arn(&self) -> std::option::Option<&str> {
self.connection_arn.as_deref()
}
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
pub fn connected_device_id(&self) -> std::option::Option<&str> {
self.connected_device_id.as_deref()
}
pub fn link_id(&self) -> std::option::Option<&str> {
self.link_id.as_deref()
}
pub fn connected_link_id(&self) -> std::option::Option<&str> {
self.connected_link_id.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn state(&self) -> std::option::Option<&crate::model::ConnectionState> {
self.state.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
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::DateTime>,
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::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> 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: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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 RouteAnalysis {
pub global_network_id: std::option::Option<std::string::String>,
pub owner_account_id: std::option::Option<std::string::String>,
pub route_analysis_id: std::option::Option<std::string::String>,
pub start_timestamp: std::option::Option<aws_smithy_types::DateTime>,
pub status: std::option::Option<crate::model::RouteAnalysisStatus>,
pub source: std::option::Option<crate::model::RouteAnalysisEndpointOptions>,
pub destination: std::option::Option<crate::model::RouteAnalysisEndpointOptions>,
pub include_return_path: bool,
pub use_middleboxes: bool,
pub forward_path: std::option::Option<crate::model::RouteAnalysisPath>,
pub return_path: std::option::Option<crate::model::RouteAnalysisPath>,
}
impl RouteAnalysis {
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn owner_account_id(&self) -> std::option::Option<&str> {
self.owner_account_id.as_deref()
}
pub fn route_analysis_id(&self) -> std::option::Option<&str> {
self.route_analysis_id.as_deref()
}
pub fn start_timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.start_timestamp.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::RouteAnalysisStatus> {
self.status.as_ref()
}
pub fn source(&self) -> std::option::Option<&crate::model::RouteAnalysisEndpointOptions> {
self.source.as_ref()
}
pub fn destination(&self) -> std::option::Option<&crate::model::RouteAnalysisEndpointOptions> {
self.destination.as_ref()
}
pub fn include_return_path(&self) -> bool {
self.include_return_path
}
pub fn use_middleboxes(&self) -> bool {
self.use_middleboxes
}
pub fn forward_path(&self) -> std::option::Option<&crate::model::RouteAnalysisPath> {
self.forward_path.as_ref()
}
pub fn return_path(&self) -> std::option::Option<&crate::model::RouteAnalysisPath> {
self.return_path.as_ref()
}
}
impl std::fmt::Debug for RouteAnalysis {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RouteAnalysis");
formatter.field("global_network_id", &self.global_network_id);
formatter.field("owner_account_id", &self.owner_account_id);
formatter.field("route_analysis_id", &self.route_analysis_id);
formatter.field("start_timestamp", &self.start_timestamp);
formatter.field("status", &self.status);
formatter.field("source", &self.source);
formatter.field("destination", &self.destination);
formatter.field("include_return_path", &self.include_return_path);
formatter.field("use_middleboxes", &self.use_middleboxes);
formatter.field("forward_path", &self.forward_path);
formatter.field("return_path", &self.return_path);
formatter.finish()
}
}
pub mod route_analysis {
#[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) owner_account_id: std::option::Option<std::string::String>,
pub(crate) route_analysis_id: std::option::Option<std::string::String>,
pub(crate) start_timestamp: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) status: std::option::Option<crate::model::RouteAnalysisStatus>,
pub(crate) source: std::option::Option<crate::model::RouteAnalysisEndpointOptions>,
pub(crate) destination: std::option::Option<crate::model::RouteAnalysisEndpointOptions>,
pub(crate) include_return_path: std::option::Option<bool>,
pub(crate) use_middleboxes: std::option::Option<bool>,
pub(crate) forward_path: std::option::Option<crate::model::RouteAnalysisPath>,
pub(crate) return_path: std::option::Option<crate::model::RouteAnalysisPath>,
}
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 owner_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_account_id = Some(input.into());
self
}
pub fn set_owner_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owner_account_id = input;
self
}
pub fn route_analysis_id(mut self, input: impl Into<std::string::String>) -> Self {
self.route_analysis_id = Some(input.into());
self
}
pub fn set_route_analysis_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.route_analysis_id = input;
self
}
pub fn start_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.start_timestamp = Some(input);
self
}
pub fn set_start_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.start_timestamp = input;
self
}
pub fn status(mut self, input: crate::model::RouteAnalysisStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::RouteAnalysisStatus>,
) -> Self {
self.status = input;
self
}
pub fn source(mut self, input: crate::model::RouteAnalysisEndpointOptions) -> Self {
self.source = Some(input);
self
}
pub fn set_source(
mut self,
input: std::option::Option<crate::model::RouteAnalysisEndpointOptions>,
) -> Self {
self.source = input;
self
}
pub fn destination(mut self, input: crate::model::RouteAnalysisEndpointOptions) -> Self {
self.destination = Some(input);
self
}
pub fn set_destination(
mut self,
input: std::option::Option<crate::model::RouteAnalysisEndpointOptions>,
) -> Self {
self.destination = input;
self
}
pub fn include_return_path(mut self, input: bool) -> Self {
self.include_return_path = Some(input);
self
}
pub fn set_include_return_path(mut self, input: std::option::Option<bool>) -> Self {
self.include_return_path = input;
self
}
pub fn use_middleboxes(mut self, input: bool) -> Self {
self.use_middleboxes = Some(input);
self
}
pub fn set_use_middleboxes(mut self, input: std::option::Option<bool>) -> Self {
self.use_middleboxes = input;
self
}
pub fn forward_path(mut self, input: crate::model::RouteAnalysisPath) -> Self {
self.forward_path = Some(input);
self
}
pub fn set_forward_path(
mut self,
input: std::option::Option<crate::model::RouteAnalysisPath>,
) -> Self {
self.forward_path = input;
self
}
pub fn return_path(mut self, input: crate::model::RouteAnalysisPath) -> Self {
self.return_path = Some(input);
self
}
pub fn set_return_path(
mut self,
input: std::option::Option<crate::model::RouteAnalysisPath>,
) -> Self {
self.return_path = input;
self
}
pub fn build(self) -> crate::model::RouteAnalysis {
crate::model::RouteAnalysis {
global_network_id: self.global_network_id,
owner_account_id: self.owner_account_id,
route_analysis_id: self.route_analysis_id,
start_timestamp: self.start_timestamp,
status: self.status,
source: self.source,
destination: self.destination,
include_return_path: self.include_return_path.unwrap_or_default(),
use_middleboxes: self.use_middleboxes.unwrap_or_default(),
forward_path: self.forward_path,
return_path: self.return_path,
}
}
}
}
impl RouteAnalysis {
pub fn builder() -> crate::model::route_analysis::Builder {
crate::model::route_analysis::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RouteAnalysisPath {
pub completion_status: std::option::Option<crate::model::RouteAnalysisCompletion>,
pub path: std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
}
impl RouteAnalysisPath {
pub fn completion_status(&self) -> std::option::Option<&crate::model::RouteAnalysisCompletion> {
self.completion_status.as_ref()
}
pub fn path(&self) -> std::option::Option<&[crate::model::PathComponent]> {
self.path.as_deref()
}
}
impl std::fmt::Debug for RouteAnalysisPath {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RouteAnalysisPath");
formatter.field("completion_status", &self.completion_status);
formatter.field("path", &self.path);
formatter.finish()
}
}
pub mod route_analysis_path {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) completion_status: std::option::Option<crate::model::RouteAnalysisCompletion>,
pub(crate) path: std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
}
impl Builder {
pub fn completion_status(mut self, input: crate::model::RouteAnalysisCompletion) -> Self {
self.completion_status = Some(input);
self
}
pub fn set_completion_status(
mut self,
input: std::option::Option<crate::model::RouteAnalysisCompletion>,
) -> Self {
self.completion_status = input;
self
}
pub fn path(mut self, input: crate::model::PathComponent) -> Self {
let mut v = self.path.unwrap_or_default();
v.push(input);
self.path = Some(v);
self
}
pub fn set_path(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
) -> Self {
self.path = input;
self
}
pub fn build(self) -> crate::model::RouteAnalysisPath {
crate::model::RouteAnalysisPath {
completion_status: self.completion_status,
path: self.path,
}
}
}
}
impl RouteAnalysisPath {
pub fn builder() -> crate::model::route_analysis_path::Builder {
crate::model::route_analysis_path::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PathComponent {
pub sequence: std::option::Option<i32>,
pub resource: std::option::Option<crate::model::NetworkResourceSummary>,
pub destination_cidr_block: std::option::Option<std::string::String>,
}
impl PathComponent {
pub fn sequence(&self) -> std::option::Option<i32> {
self.sequence
}
pub fn resource(&self) -> std::option::Option<&crate::model::NetworkResourceSummary> {
self.resource.as_ref()
}
pub fn destination_cidr_block(&self) -> std::option::Option<&str> {
self.destination_cidr_block.as_deref()
}
}
impl std::fmt::Debug for PathComponent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PathComponent");
formatter.field("sequence", &self.sequence);
formatter.field("resource", &self.resource);
formatter.field("destination_cidr_block", &self.destination_cidr_block);
formatter.finish()
}
}
pub mod path_component {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) sequence: std::option::Option<i32>,
pub(crate) resource: std::option::Option<crate::model::NetworkResourceSummary>,
pub(crate) destination_cidr_block: std::option::Option<std::string::String>,
}
impl Builder {
pub fn sequence(mut self, input: i32) -> Self {
self.sequence = Some(input);
self
}
pub fn set_sequence(mut self, input: std::option::Option<i32>) -> Self {
self.sequence = input;
self
}
pub fn resource(mut self, input: crate::model::NetworkResourceSummary) -> Self {
self.resource = Some(input);
self
}
pub fn set_resource(
mut self,
input: std::option::Option<crate::model::NetworkResourceSummary>,
) -> Self {
self.resource = input;
self
}
pub fn destination_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_cidr_block = Some(input.into());
self
}
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_cidr_block = input;
self
}
pub fn build(self) -> crate::model::PathComponent {
crate::model::PathComponent {
sequence: self.sequence,
resource: self.resource,
destination_cidr_block: self.destination_cidr_block,
}
}
}
}
impl PathComponent {
pub fn builder() -> crate::model::path_component::Builder {
crate::model::path_component::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NetworkResourceSummary {
pub registered_gateway_arn: std::option::Option<std::string::String>,
pub resource_arn: std::option::Option<std::string::String>,
pub resource_type: std::option::Option<std::string::String>,
pub definition: std::option::Option<std::string::String>,
pub name_tag: std::option::Option<std::string::String>,
pub is_middlebox: bool,
}
impl NetworkResourceSummary {
pub fn registered_gateway_arn(&self) -> std::option::Option<&str> {
self.registered_gateway_arn.as_deref()
}
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn definition(&self) -> std::option::Option<&str> {
self.definition.as_deref()
}
pub fn name_tag(&self) -> std::option::Option<&str> {
self.name_tag.as_deref()
}
pub fn is_middlebox(&self) -> bool {
self.is_middlebox
}
}
impl std::fmt::Debug for NetworkResourceSummary {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NetworkResourceSummary");
formatter.field("registered_gateway_arn", &self.registered_gateway_arn);
formatter.field("resource_arn", &self.resource_arn);
formatter.field("resource_type", &self.resource_type);
formatter.field("definition", &self.definition);
formatter.field("name_tag", &self.name_tag);
formatter.field("is_middlebox", &self.is_middlebox);
formatter.finish()
}
}
pub mod network_resource_summary {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) registered_gateway_arn: std::option::Option<std::string::String>,
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) definition: std::option::Option<std::string::String>,
pub(crate) name_tag: std::option::Option<std::string::String>,
pub(crate) is_middlebox: std::option::Option<bool>,
}
impl Builder {
pub fn registered_gateway_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.registered_gateway_arn = Some(input.into());
self
}
pub fn set_registered_gateway_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.registered_gateway_arn = input;
self
}
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn definition(mut self, input: impl Into<std::string::String>) -> Self {
self.definition = Some(input.into());
self
}
pub fn set_definition(mut self, input: std::option::Option<std::string::String>) -> Self {
self.definition = input;
self
}
pub fn name_tag(mut self, input: impl Into<std::string::String>) -> Self {
self.name_tag = Some(input.into());
self
}
pub fn set_name_tag(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name_tag = input;
self
}
pub fn is_middlebox(mut self, input: bool) -> Self {
self.is_middlebox = Some(input);
self
}
pub fn set_is_middlebox(mut self, input: std::option::Option<bool>) -> Self {
self.is_middlebox = input;
self
}
pub fn build(self) -> crate::model::NetworkResourceSummary {
crate::model::NetworkResourceSummary {
registered_gateway_arn: self.registered_gateway_arn,
resource_arn: self.resource_arn,
resource_type: self.resource_type,
definition: self.definition,
name_tag: self.name_tag,
is_middlebox: self.is_middlebox.unwrap_or_default(),
}
}
}
}
impl NetworkResourceSummary {
pub fn builder() -> crate::model::network_resource_summary::Builder {
crate::model::network_resource_summary::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RouteAnalysisCompletion {
pub result_code: std::option::Option<crate::model::RouteAnalysisCompletionResultCode>,
pub reason_code: std::option::Option<crate::model::RouteAnalysisCompletionReasonCode>,
pub reason_context:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl RouteAnalysisCompletion {
pub fn result_code(
&self,
) -> std::option::Option<&crate::model::RouteAnalysisCompletionResultCode> {
self.result_code.as_ref()
}
pub fn reason_code(
&self,
) -> std::option::Option<&crate::model::RouteAnalysisCompletionReasonCode> {
self.reason_code.as_ref()
}
pub fn reason_context(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.reason_context.as_ref()
}
}
impl std::fmt::Debug for RouteAnalysisCompletion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RouteAnalysisCompletion");
formatter.field("result_code", &self.result_code);
formatter.field("reason_code", &self.reason_code);
formatter.field("reason_context", &self.reason_context);
formatter.finish()
}
}
pub mod route_analysis_completion {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) result_code:
std::option::Option<crate::model::RouteAnalysisCompletionResultCode>,
pub(crate) reason_code:
std::option::Option<crate::model::RouteAnalysisCompletionReasonCode>,
pub(crate) reason_context: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn result_code(
mut self,
input: crate::model::RouteAnalysisCompletionResultCode,
) -> Self {
self.result_code = Some(input);
self
}
pub fn set_result_code(
mut self,
input: std::option::Option<crate::model::RouteAnalysisCompletionResultCode>,
) -> Self {
self.result_code = input;
self
}
pub fn reason_code(
mut self,
input: crate::model::RouteAnalysisCompletionReasonCode,
) -> Self {
self.reason_code = Some(input);
self
}
pub fn set_reason_code(
mut self,
input: std::option::Option<crate::model::RouteAnalysisCompletionReasonCode>,
) -> Self {
self.reason_code = input;
self
}
pub fn reason_context(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.reason_context.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.reason_context = Some(hash_map);
self
}
pub fn set_reason_context(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.reason_context = input;
self
}
pub fn build(self) -> crate::model::RouteAnalysisCompletion {
crate::model::RouteAnalysisCompletion {
result_code: self.result_code,
reason_code: self.reason_code,
reason_context: self.reason_context,
}
}
}
}
impl RouteAnalysisCompletion {
pub fn builder() -> crate::model::route_analysis_completion::Builder {
crate::model::route_analysis_completion::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 RouteAnalysisCompletionReasonCode {
#[allow(missing_docs)] BlackholeRouteForDestinationFound,
#[allow(missing_docs)] CyclicPathDetected,
#[allow(missing_docs)] InactiveRouteForDestinationFound,
#[allow(missing_docs)] MaxHopsExceeded,
#[allow(missing_docs)] NoDestinationArnProvided,
#[allow(missing_docs)] PossibleMiddlebox,
#[allow(missing_docs)] RouteNotFound,
#[allow(missing_docs)] TransitGatewayAttachment,
#[allow(missing_docs)] TransitGatewayAttachmentNotFound,
#[allow(missing_docs)] TransitGatewayAttachmentNotInTransitGateway,
#[allow(missing_docs)] TransitGatewayAttachmentStableRouteTableNotFound,
Unknown(String),
}
impl std::convert::From<&str> for RouteAnalysisCompletionReasonCode {
fn from(s: &str) -> Self {
match s {
"BLACKHOLE_ROUTE_FOR_DESTINATION_FOUND" => {
RouteAnalysisCompletionReasonCode::BlackholeRouteForDestinationFound
}
"CYCLIC_PATH_DETECTED" => RouteAnalysisCompletionReasonCode::CyclicPathDetected,
"INACTIVE_ROUTE_FOR_DESTINATION_FOUND" => {
RouteAnalysisCompletionReasonCode::InactiveRouteForDestinationFound
}
"MAX_HOPS_EXCEEDED" => RouteAnalysisCompletionReasonCode::MaxHopsExceeded,
"NO_DESTINATION_ARN_PROVIDED" => {
RouteAnalysisCompletionReasonCode::NoDestinationArnProvided
}
"POSSIBLE_MIDDLEBOX" => RouteAnalysisCompletionReasonCode::PossibleMiddlebox,
"ROUTE_NOT_FOUND" => RouteAnalysisCompletionReasonCode::RouteNotFound,
"TRANSIT_GATEWAY_ATTACHMENT_ATTACH_ARN_NO_MATCH" => {
RouteAnalysisCompletionReasonCode::TransitGatewayAttachment
}
"TRANSIT_GATEWAY_ATTACHMENT_NOT_FOUND" => {
RouteAnalysisCompletionReasonCode::TransitGatewayAttachmentNotFound
}
"TRANSIT_GATEWAY_ATTACHMENT_NOT_IN_TRANSIT_GATEWAY" => {
RouteAnalysisCompletionReasonCode::TransitGatewayAttachmentNotInTransitGateway
}
"TRANSIT_GATEWAY_ATTACHMENT_STABLE_ROUTE_TABLE_NOT_FOUND" => {
RouteAnalysisCompletionReasonCode::TransitGatewayAttachmentStableRouteTableNotFound
}
other => RouteAnalysisCompletionReasonCode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RouteAnalysisCompletionReasonCode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RouteAnalysisCompletionReasonCode::from(s))
}
}
impl RouteAnalysisCompletionReasonCode {
pub fn as_str(&self) -> &str {
match self {
RouteAnalysisCompletionReasonCode::BlackholeRouteForDestinationFound => {
"BLACKHOLE_ROUTE_FOR_DESTINATION_FOUND"
}
RouteAnalysisCompletionReasonCode::CyclicPathDetected => "CYCLIC_PATH_DETECTED",
RouteAnalysisCompletionReasonCode::InactiveRouteForDestinationFound => {
"INACTIVE_ROUTE_FOR_DESTINATION_FOUND"
}
RouteAnalysisCompletionReasonCode::MaxHopsExceeded => "MAX_HOPS_EXCEEDED",
RouteAnalysisCompletionReasonCode::NoDestinationArnProvided => {
"NO_DESTINATION_ARN_PROVIDED"
}
RouteAnalysisCompletionReasonCode::PossibleMiddlebox => "POSSIBLE_MIDDLEBOX",
RouteAnalysisCompletionReasonCode::RouteNotFound => "ROUTE_NOT_FOUND",
RouteAnalysisCompletionReasonCode::TransitGatewayAttachment => {
"TRANSIT_GATEWAY_ATTACHMENT_ATTACH_ARN_NO_MATCH"
}
RouteAnalysisCompletionReasonCode::TransitGatewayAttachmentNotFound => {
"TRANSIT_GATEWAY_ATTACHMENT_NOT_FOUND"
}
RouteAnalysisCompletionReasonCode::TransitGatewayAttachmentNotInTransitGateway => {
"TRANSIT_GATEWAY_ATTACHMENT_NOT_IN_TRANSIT_GATEWAY"
}
RouteAnalysisCompletionReasonCode::TransitGatewayAttachmentStableRouteTableNotFound => {
"TRANSIT_GATEWAY_ATTACHMENT_STABLE_ROUTE_TABLE_NOT_FOUND"
}
RouteAnalysisCompletionReasonCode::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"BLACKHOLE_ROUTE_FOR_DESTINATION_FOUND",
"CYCLIC_PATH_DETECTED",
"INACTIVE_ROUTE_FOR_DESTINATION_FOUND",
"MAX_HOPS_EXCEEDED",
"NO_DESTINATION_ARN_PROVIDED",
"POSSIBLE_MIDDLEBOX",
"ROUTE_NOT_FOUND",
"TRANSIT_GATEWAY_ATTACHMENT_ATTACH_ARN_NO_MATCH",
"TRANSIT_GATEWAY_ATTACHMENT_NOT_FOUND",
"TRANSIT_GATEWAY_ATTACHMENT_NOT_IN_TRANSIT_GATEWAY",
"TRANSIT_GATEWAY_ATTACHMENT_STABLE_ROUTE_TABLE_NOT_FOUND",
]
}
}
impl AsRef<str> for RouteAnalysisCompletionReasonCode {
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 RouteAnalysisCompletionResultCode {
#[allow(missing_docs)] Connected,
#[allow(missing_docs)] NotConnected,
Unknown(String),
}
impl std::convert::From<&str> for RouteAnalysisCompletionResultCode {
fn from(s: &str) -> Self {
match s {
"CONNECTED" => RouteAnalysisCompletionResultCode::Connected,
"NOT_CONNECTED" => RouteAnalysisCompletionResultCode::NotConnected,
other => RouteAnalysisCompletionResultCode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RouteAnalysisCompletionResultCode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RouteAnalysisCompletionResultCode::from(s))
}
}
impl RouteAnalysisCompletionResultCode {
pub fn as_str(&self) -> &str {
match self {
RouteAnalysisCompletionResultCode::Connected => "CONNECTED",
RouteAnalysisCompletionResultCode::NotConnected => "NOT_CONNECTED",
RouteAnalysisCompletionResultCode::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["CONNECTED", "NOT_CONNECTED"]
}
}
impl AsRef<str> for RouteAnalysisCompletionResultCode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RouteAnalysisEndpointOptions {
pub transit_gateway_attachment_arn: std::option::Option<std::string::String>,
pub transit_gateway_arn: std::option::Option<std::string::String>,
pub ip_address: std::option::Option<std::string::String>,
}
impl RouteAnalysisEndpointOptions {
pub fn transit_gateway_attachment_arn(&self) -> std::option::Option<&str> {
self.transit_gateway_attachment_arn.as_deref()
}
pub fn transit_gateway_arn(&self) -> std::option::Option<&str> {
self.transit_gateway_arn.as_deref()
}
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
}
impl std::fmt::Debug for RouteAnalysisEndpointOptions {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RouteAnalysisEndpointOptions");
formatter.field(
"transit_gateway_attachment_arn",
&self.transit_gateway_attachment_arn,
);
formatter.field("transit_gateway_arn", &self.transit_gateway_arn);
formatter.field("ip_address", &self.ip_address);
formatter.finish()
}
}
pub mod route_analysis_endpoint_options {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) transit_gateway_attachment_arn: std::option::Option<std::string::String>,
pub(crate) transit_gateway_arn: std::option::Option<std::string::String>,
pub(crate) ip_address: std::option::Option<std::string::String>,
}
impl Builder {
pub fn transit_gateway_attachment_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.transit_gateway_attachment_arn = Some(input.into());
self
}
pub fn set_transit_gateway_attachment_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transit_gateway_attachment_arn = 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 ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_address = Some(input.into());
self
}
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
pub fn build(self) -> crate::model::RouteAnalysisEndpointOptions {
crate::model::RouteAnalysisEndpointOptions {
transit_gateway_attachment_arn: self.transit_gateway_attachment_arn,
transit_gateway_arn: self.transit_gateway_arn,
ip_address: self.ip_address,
}
}
}
}
impl RouteAnalysisEndpointOptions {
pub fn builder() -> crate::model::route_analysis_endpoint_options::Builder {
crate::model::route_analysis_endpoint_options::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 RouteAnalysisStatus {
#[allow(missing_docs)] Completed,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] Running,
Unknown(String),
}
impl std::convert::From<&str> for RouteAnalysisStatus {
fn from(s: &str) -> Self {
match s {
"COMPLETED" => RouteAnalysisStatus::Completed,
"FAILED" => RouteAnalysisStatus::Failed,
"RUNNING" => RouteAnalysisStatus::Running,
other => RouteAnalysisStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RouteAnalysisStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RouteAnalysisStatus::from(s))
}
}
impl RouteAnalysisStatus {
pub fn as_str(&self) -> &str {
match self {
RouteAnalysisStatus::Completed => "COMPLETED",
RouteAnalysisStatus::Failed => "FAILED",
RouteAnalysisStatus::Running => "RUNNING",
RouteAnalysisStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["COMPLETED", "FAILED", "RUNNING"]
}
}
impl AsRef<str> for RouteAnalysisStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RouteAnalysisEndpointOptionsSpecification {
pub transit_gateway_attachment_arn: std::option::Option<std::string::String>,
pub ip_address: std::option::Option<std::string::String>,
}
impl RouteAnalysisEndpointOptionsSpecification {
pub fn transit_gateway_attachment_arn(&self) -> std::option::Option<&str> {
self.transit_gateway_attachment_arn.as_deref()
}
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
}
impl std::fmt::Debug for RouteAnalysisEndpointOptionsSpecification {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RouteAnalysisEndpointOptionsSpecification");
formatter.field(
"transit_gateway_attachment_arn",
&self.transit_gateway_attachment_arn,
);
formatter.field("ip_address", &self.ip_address);
formatter.finish()
}
}
pub mod route_analysis_endpoint_options_specification {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) transit_gateway_attachment_arn: std::option::Option<std::string::String>,
pub(crate) ip_address: std::option::Option<std::string::String>,
}
impl Builder {
pub fn transit_gateway_attachment_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.transit_gateway_attachment_arn = Some(input.into());
self
}
pub fn set_transit_gateway_attachment_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transit_gateway_attachment_arn = input;
self
}
pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_address = Some(input.into());
self
}
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
pub fn build(self) -> crate::model::RouteAnalysisEndpointOptionsSpecification {
crate::model::RouteAnalysisEndpointOptionsSpecification {
transit_gateway_attachment_arn: self.transit_gateway_attachment_arn,
ip_address: self.ip_address,
}
}
}
}
impl RouteAnalysisEndpointOptionsSpecification {
pub fn builder() -> crate::model::route_analysis_endpoint_options_specification::Builder {
crate::model::route_analysis_endpoint_options_specification::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CoreNetworkPolicy {
pub core_network_id: std::option::Option<std::string::String>,
pub policy_version_id: std::option::Option<i32>,
pub alias: std::option::Option<crate::model::CoreNetworkPolicyAlias>,
pub description: std::option::Option<std::string::String>,
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
pub change_set_state: std::option::Option<crate::model::ChangeSetState>,
pub policy_errors: std::option::Option<std::vec::Vec<crate::model::CoreNetworkPolicyError>>,
pub policy_document: std::option::Option<std::string::String>,
}
impl CoreNetworkPolicy {
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn policy_version_id(&self) -> std::option::Option<i32> {
self.policy_version_id
}
pub fn alias(&self) -> std::option::Option<&crate::model::CoreNetworkPolicyAlias> {
self.alias.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn change_set_state(&self) -> std::option::Option<&crate::model::ChangeSetState> {
self.change_set_state.as_ref()
}
pub fn policy_errors(&self) -> std::option::Option<&[crate::model::CoreNetworkPolicyError]> {
self.policy_errors.as_deref()
}
pub fn policy_document(&self) -> std::option::Option<&str> {
self.policy_document.as_deref()
}
}
impl std::fmt::Debug for CoreNetworkPolicy {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetworkPolicy");
formatter.field("core_network_id", &self.core_network_id);
formatter.field("policy_version_id", &self.policy_version_id);
formatter.field("alias", &self.alias);
formatter.field("description", &self.description);
formatter.field("created_at", &self.created_at);
formatter.field("change_set_state", &self.change_set_state);
formatter.field("policy_errors", &self.policy_errors);
formatter.field("policy_document", &self.policy_document);
formatter.finish()
}
}
pub mod core_network_policy {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_id: std::option::Option<std::string::String>,
pub(crate) policy_version_id: std::option::Option<i32>,
pub(crate) alias: std::option::Option<crate::model::CoreNetworkPolicyAlias>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) change_set_state: std::option::Option<crate::model::ChangeSetState>,
pub(crate) policy_errors:
std::option::Option<std::vec::Vec<crate::model::CoreNetworkPolicyError>>,
pub(crate) policy_document: std::option::Option<std::string::String>,
}
impl Builder {
pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn policy_version_id(mut self, input: i32) -> Self {
self.policy_version_id = Some(input);
self
}
pub fn set_policy_version_id(mut self, input: std::option::Option<i32>) -> Self {
self.policy_version_id = input;
self
}
pub fn alias(mut self, input: crate::model::CoreNetworkPolicyAlias) -> Self {
self.alias = Some(input);
self
}
pub fn set_alias(
mut self,
input: std::option::Option<crate::model::CoreNetworkPolicyAlias>,
) -> Self {
self.alias = 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::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
pub fn change_set_state(mut self, input: crate::model::ChangeSetState) -> Self {
self.change_set_state = Some(input);
self
}
pub fn set_change_set_state(
mut self,
input: std::option::Option<crate::model::ChangeSetState>,
) -> Self {
self.change_set_state = input;
self
}
pub fn policy_errors(mut self, input: crate::model::CoreNetworkPolicyError) -> Self {
let mut v = self.policy_errors.unwrap_or_default();
v.push(input);
self.policy_errors = Some(v);
self
}
pub fn set_policy_errors(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CoreNetworkPolicyError>>,
) -> Self {
self.policy_errors = input;
self
}
pub fn policy_document(mut self, input: impl Into<std::string::String>) -> Self {
self.policy_document = Some(input.into());
self
}
pub fn set_policy_document(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.policy_document = input;
self
}
pub fn build(self) -> crate::model::CoreNetworkPolicy {
crate::model::CoreNetworkPolicy {
core_network_id: self.core_network_id,
policy_version_id: self.policy_version_id,
alias: self.alias,
description: self.description,
created_at: self.created_at,
change_set_state: self.change_set_state,
policy_errors: self.policy_errors,
policy_document: self.policy_document,
}
}
}
}
impl CoreNetworkPolicy {
pub fn builder() -> crate::model::core_network_policy::Builder {
crate::model::core_network_policy::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CoreNetworkPolicyError {
pub error_code: std::option::Option<std::string::String>,
pub message: std::option::Option<std::string::String>,
pub path: std::option::Option<std::string::String>,
}
impl CoreNetworkPolicyError {
pub fn error_code(&self) -> std::option::Option<&str> {
self.error_code.as_deref()
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
pub fn path(&self) -> std::option::Option<&str> {
self.path.as_deref()
}
}
impl std::fmt::Debug for CoreNetworkPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetworkPolicyError");
formatter.field("error_code", &self.error_code);
formatter.field("message", &self.message);
formatter.field("path", &self.path);
formatter.finish()
}
}
pub mod core_network_policy_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) error_code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) path: std::option::Option<std::string::String>,
}
impl Builder {
pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
self.error_code = Some(input.into());
self
}
pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.error_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 path(mut self, input: impl Into<std::string::String>) -> Self {
self.path = Some(input.into());
self
}
pub fn set_path(mut self, input: std::option::Option<std::string::String>) -> Self {
self.path = input;
self
}
pub fn build(self) -> crate::model::CoreNetworkPolicyError {
crate::model::CoreNetworkPolicyError {
error_code: self.error_code,
message: self.message,
path: self.path,
}
}
}
}
impl CoreNetworkPolicyError {
pub fn builder() -> crate::model::core_network_policy_error::Builder {
crate::model::core_network_policy_error::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 ChangeSetState {
#[allow(missing_docs)] Executing,
#[allow(missing_docs)] ExecutionSucceeded,
#[allow(missing_docs)] FailedGeneration,
#[allow(missing_docs)] OutOfDate,
#[allow(missing_docs)] PendingGeneration,
#[allow(missing_docs)] ReadyToExecute,
Unknown(String),
}
impl std::convert::From<&str> for ChangeSetState {
fn from(s: &str) -> Self {
match s {
"EXECUTING" => ChangeSetState::Executing,
"EXECUTION_SUCCEEDED" => ChangeSetState::ExecutionSucceeded,
"FAILED_GENERATION" => ChangeSetState::FailedGeneration,
"OUT_OF_DATE" => ChangeSetState::OutOfDate,
"PENDING_GENERATION" => ChangeSetState::PendingGeneration,
"READY_TO_EXECUTE" => ChangeSetState::ReadyToExecute,
other => ChangeSetState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ChangeSetState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ChangeSetState::from(s))
}
}
impl ChangeSetState {
pub fn as_str(&self) -> &str {
match self {
ChangeSetState::Executing => "EXECUTING",
ChangeSetState::ExecutionSucceeded => "EXECUTION_SUCCEEDED",
ChangeSetState::FailedGeneration => "FAILED_GENERATION",
ChangeSetState::OutOfDate => "OUT_OF_DATE",
ChangeSetState::PendingGeneration => "PENDING_GENERATION",
ChangeSetState::ReadyToExecute => "READY_TO_EXECUTE",
ChangeSetState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"EXECUTING",
"EXECUTION_SUCCEEDED",
"FAILED_GENERATION",
"OUT_OF_DATE",
"PENDING_GENERATION",
"READY_TO_EXECUTE",
]
}
}
impl AsRef<str> for ChangeSetState {
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 CoreNetworkPolicyAlias {
#[allow(missing_docs)] Latest,
#[allow(missing_docs)] Live,
Unknown(String),
}
impl std::convert::From<&str> for CoreNetworkPolicyAlias {
fn from(s: &str) -> Self {
match s {
"LATEST" => CoreNetworkPolicyAlias::Latest,
"LIVE" => CoreNetworkPolicyAlias::Live,
other => CoreNetworkPolicyAlias::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CoreNetworkPolicyAlias {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CoreNetworkPolicyAlias::from(s))
}
}
impl CoreNetworkPolicyAlias {
pub fn as_str(&self) -> &str {
match self {
CoreNetworkPolicyAlias::Latest => "LATEST",
CoreNetworkPolicyAlias::Live => "LIVE",
CoreNetworkPolicyAlias::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["LATEST", "LIVE"]
}
}
impl AsRef<str> for CoreNetworkPolicyAlias {
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 TransitGatewayRegistration {
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn transit_gateway_arn(&self) -> std::option::Option<&str> {
self.transit_gateway_arn.as_deref()
}
pub fn state(
&self,
) -> std::option::Option<&crate::model::TransitGatewayRegistrationStateReason> {
self.state.as_ref()
}
}
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 TransitGatewayRegistrationStateReason {
pub fn code(&self) -> std::option::Option<&crate::model::TransitGatewayRegistrationState> {
self.code.as_ref()
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
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 CoreNetworkSummary {
pub core_network_id: std::option::Option<std::string::String>,
pub core_network_arn: std::option::Option<std::string::String>,
pub global_network_id: std::option::Option<std::string::String>,
pub owner_account_id: std::option::Option<std::string::String>,
pub state: std::option::Option<crate::model::CoreNetworkState>,
pub description: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CoreNetworkSummary {
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn core_network_arn(&self) -> std::option::Option<&str> {
self.core_network_arn.as_deref()
}
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn owner_account_id(&self) -> std::option::Option<&str> {
self.owner_account_id.as_deref()
}
pub fn state(&self) -> std::option::Option<&crate::model::CoreNetworkState> {
self.state.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CoreNetworkSummary {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetworkSummary");
formatter.field("core_network_id", &self.core_network_id);
formatter.field("core_network_arn", &self.core_network_arn);
formatter.field("global_network_id", &self.global_network_id);
formatter.field("owner_account_id", &self.owner_account_id);
formatter.field("state", &self.state);
formatter.field("description", &self.description);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod core_network_summary {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_id: std::option::Option<std::string::String>,
pub(crate) core_network_arn: std::option::Option<std::string::String>,
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) owner_account_id: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::CoreNetworkState>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn core_network_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_arn = Some(input.into());
self
}
pub fn set_core_network_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_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 owner_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_account_id = Some(input.into());
self
}
pub fn set_owner_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owner_account_id = input;
self
}
pub fn state(mut self, input: crate::model::CoreNetworkState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::CoreNetworkState>,
) -> Self {
self.state = 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 tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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::CoreNetworkSummary {
crate::model::CoreNetworkSummary {
core_network_id: self.core_network_id,
core_network_arn: self.core_network_arn,
global_network_id: self.global_network_id,
owner_account_id: self.owner_account_id,
state: self.state,
description: self.description,
tags: self.tags,
}
}
}
}
impl CoreNetworkSummary {
pub fn builder() -> crate::model::core_network_summary::Builder {
crate::model::core_network_summary::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CoreNetworkPolicyVersion {
pub core_network_id: std::option::Option<std::string::String>,
pub policy_version_id: std::option::Option<i32>,
pub alias: std::option::Option<crate::model::CoreNetworkPolicyAlias>,
pub description: std::option::Option<std::string::String>,
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
pub change_set_state: std::option::Option<crate::model::ChangeSetState>,
}
impl CoreNetworkPolicyVersion {
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn policy_version_id(&self) -> std::option::Option<i32> {
self.policy_version_id
}
pub fn alias(&self) -> std::option::Option<&crate::model::CoreNetworkPolicyAlias> {
self.alias.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn change_set_state(&self) -> std::option::Option<&crate::model::ChangeSetState> {
self.change_set_state.as_ref()
}
}
impl std::fmt::Debug for CoreNetworkPolicyVersion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetworkPolicyVersion");
formatter.field("core_network_id", &self.core_network_id);
formatter.field("policy_version_id", &self.policy_version_id);
formatter.field("alias", &self.alias);
formatter.field("description", &self.description);
formatter.field("created_at", &self.created_at);
formatter.field("change_set_state", &self.change_set_state);
formatter.finish()
}
}
pub mod core_network_policy_version {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_id: std::option::Option<std::string::String>,
pub(crate) policy_version_id: std::option::Option<i32>,
pub(crate) alias: std::option::Option<crate::model::CoreNetworkPolicyAlias>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) change_set_state: std::option::Option<crate::model::ChangeSetState>,
}
impl Builder {
pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn policy_version_id(mut self, input: i32) -> Self {
self.policy_version_id = Some(input);
self
}
pub fn set_policy_version_id(mut self, input: std::option::Option<i32>) -> Self {
self.policy_version_id = input;
self
}
pub fn alias(mut self, input: crate::model::CoreNetworkPolicyAlias) -> Self {
self.alias = Some(input);
self
}
pub fn set_alias(
mut self,
input: std::option::Option<crate::model::CoreNetworkPolicyAlias>,
) -> Self {
self.alias = 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::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
pub fn change_set_state(mut self, input: crate::model::ChangeSetState) -> Self {
self.change_set_state = Some(input);
self
}
pub fn set_change_set_state(
mut self,
input: std::option::Option<crate::model::ChangeSetState>,
) -> Self {
self.change_set_state = input;
self
}
pub fn build(self) -> crate::model::CoreNetworkPolicyVersion {
crate::model::CoreNetworkPolicyVersion {
core_network_id: self.core_network_id,
policy_version_id: self.policy_version_id,
alias: self.alias,
description: self.description,
created_at: self.created_at,
change_set_state: self.change_set_state,
}
}
}
}
impl CoreNetworkPolicyVersion {
pub fn builder() -> crate::model::core_network_policy_version::Builder {
crate::model::core_network_policy_version::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConnectPeerSummary {
pub core_network_id: std::option::Option<std::string::String>,
pub connect_attachment_id: std::option::Option<std::string::String>,
pub connect_peer_id: std::option::Option<std::string::String>,
pub edge_location: std::option::Option<std::string::String>,
pub connect_peer_state: std::option::Option<crate::model::ConnectPeerState>,
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ConnectPeerSummary {
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn connect_attachment_id(&self) -> std::option::Option<&str> {
self.connect_attachment_id.as_deref()
}
pub fn connect_peer_id(&self) -> std::option::Option<&str> {
self.connect_peer_id.as_deref()
}
pub fn edge_location(&self) -> std::option::Option<&str> {
self.edge_location.as_deref()
}
pub fn connect_peer_state(&self) -> std::option::Option<&crate::model::ConnectPeerState> {
self.connect_peer_state.as_ref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for ConnectPeerSummary {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConnectPeerSummary");
formatter.field("core_network_id", &self.core_network_id);
formatter.field("connect_attachment_id", &self.connect_attachment_id);
formatter.field("connect_peer_id", &self.connect_peer_id);
formatter.field("edge_location", &self.edge_location);
formatter.field("connect_peer_state", &self.connect_peer_state);
formatter.field("created_at", &self.created_at);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod connect_peer_summary {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_id: std::option::Option<std::string::String>,
pub(crate) connect_attachment_id: std::option::Option<std::string::String>,
pub(crate) connect_peer_id: std::option::Option<std::string::String>,
pub(crate) edge_location: std::option::Option<std::string::String>,
pub(crate) connect_peer_state: std::option::Option<crate::model::ConnectPeerState>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn connect_attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connect_attachment_id = Some(input.into());
self
}
pub fn set_connect_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connect_attachment_id = input;
self
}
pub fn connect_peer_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connect_peer_id = Some(input.into());
self
}
pub fn set_connect_peer_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connect_peer_id = input;
self
}
pub fn edge_location(mut self, input: impl Into<std::string::String>) -> Self {
self.edge_location = Some(input.into());
self
}
pub fn set_edge_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.edge_location = input;
self
}
pub fn connect_peer_state(mut self, input: crate::model::ConnectPeerState) -> Self {
self.connect_peer_state = Some(input);
self
}
pub fn set_connect_peer_state(
mut self,
input: std::option::Option<crate::model::ConnectPeerState>,
) -> Self {
self.connect_peer_state = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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::ConnectPeerSummary {
crate::model::ConnectPeerSummary {
core_network_id: self.core_network_id,
connect_attachment_id: self.connect_attachment_id,
connect_peer_id: self.connect_peer_id,
edge_location: self.edge_location,
connect_peer_state: self.connect_peer_state,
created_at: self.created_at,
tags: self.tags,
}
}
}
}
impl ConnectPeerSummary {
pub fn builder() -> crate::model::connect_peer_summary::Builder {
crate::model::connect_peer_summary::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 ConnectPeerState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Creating,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Failed,
Unknown(String),
}
impl std::convert::From<&str> for ConnectPeerState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => ConnectPeerState::Available,
"CREATING" => ConnectPeerState::Creating,
"DELETING" => ConnectPeerState::Deleting,
"FAILED" => ConnectPeerState::Failed,
other => ConnectPeerState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ConnectPeerState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ConnectPeerState::from(s))
}
}
impl ConnectPeerState {
pub fn as_str(&self) -> &str {
match self {
ConnectPeerState::Available => "AVAILABLE",
ConnectPeerState::Creating => "CREATING",
ConnectPeerState::Deleting => "DELETING",
ConnectPeerState::Failed => "FAILED",
ConnectPeerState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "CREATING", "DELETING", "FAILED"]
}
}
impl AsRef<str> for ConnectPeerState {
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 TransitGatewayConnectPeerAssociation {
pub fn transit_gateway_connect_peer_arn(&self) -> std::option::Option<&str> {
self.transit_gateway_connect_peer_arn.as_deref()
}
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
pub fn link_id(&self) -> std::option::Option<&str> {
self.link_id.as_deref()
}
pub fn state(
&self,
) -> std::option::Option<&crate::model::TransitGatewayConnectPeerAssociationState> {
self.state.as_ref()
}
}
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 SiteToSiteVpnAttachment {
pub attachment: std::option::Option<crate::model::Attachment>,
pub vpn_connection_arn: std::option::Option<std::string::String>,
}
impl SiteToSiteVpnAttachment {
pub fn attachment(&self) -> std::option::Option<&crate::model::Attachment> {
self.attachment.as_ref()
}
pub fn vpn_connection_arn(&self) -> std::option::Option<&str> {
self.vpn_connection_arn.as_deref()
}
}
impl std::fmt::Debug for SiteToSiteVpnAttachment {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SiteToSiteVpnAttachment");
formatter.field("attachment", &self.attachment);
formatter.field("vpn_connection_arn", &self.vpn_connection_arn);
formatter.finish()
}
}
pub mod site_to_site_vpn_attachment {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) attachment: std::option::Option<crate::model::Attachment>,
pub(crate) vpn_connection_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn attachment(mut self, input: crate::model::Attachment) -> Self {
self.attachment = Some(input);
self
}
pub fn set_attachment(
mut self,
input: std::option::Option<crate::model::Attachment>,
) -> Self {
self.attachment = input;
self
}
pub fn vpn_connection_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.vpn_connection_arn = Some(input.into());
self
}
pub fn set_vpn_connection_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.vpn_connection_arn = input;
self
}
pub fn build(self) -> crate::model::SiteToSiteVpnAttachment {
crate::model::SiteToSiteVpnAttachment {
attachment: self.attachment,
vpn_connection_arn: self.vpn_connection_arn,
}
}
}
}
impl SiteToSiteVpnAttachment {
pub fn builder() -> crate::model::site_to_site_vpn_attachment::Builder {
crate::model::site_to_site_vpn_attachment::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NetworkTelemetry {
pub registered_gateway_arn: std::option::Option<std::string::String>,
pub core_network_id: std::option::Option<std::string::String>,
pub aws_region: std::option::Option<std::string::String>,
pub account_id: std::option::Option<std::string::String>,
pub resource_type: std::option::Option<std::string::String>,
pub resource_id: std::option::Option<std::string::String>,
pub resource_arn: std::option::Option<std::string::String>,
pub address: std::option::Option<std::string::String>,
pub health: std::option::Option<crate::model::ConnectionHealth>,
}
impl NetworkTelemetry {
pub fn registered_gateway_arn(&self) -> std::option::Option<&str> {
self.registered_gateway_arn.as_deref()
}
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn aws_region(&self) -> std::option::Option<&str> {
self.aws_region.as_deref()
}
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn address(&self) -> std::option::Option<&str> {
self.address.as_deref()
}
pub fn health(&self) -> std::option::Option<&crate::model::ConnectionHealth> {
self.health.as_ref()
}
}
impl std::fmt::Debug for NetworkTelemetry {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NetworkTelemetry");
formatter.field("registered_gateway_arn", &self.registered_gateway_arn);
formatter.field("core_network_id", &self.core_network_id);
formatter.field("aws_region", &self.aws_region);
formatter.field("account_id", &self.account_id);
formatter.field("resource_type", &self.resource_type);
formatter.field("resource_id", &self.resource_id);
formatter.field("resource_arn", &self.resource_arn);
formatter.field("address", &self.address);
formatter.field("health", &self.health);
formatter.finish()
}
}
pub mod network_telemetry {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) registered_gateway_arn: std::option::Option<std::string::String>,
pub(crate) core_network_id: std::option::Option<std::string::String>,
pub(crate) aws_region: std::option::Option<std::string::String>,
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) address: std::option::Option<std::string::String>,
pub(crate) health: std::option::Option<crate::model::ConnectionHealth>,
}
impl Builder {
pub fn registered_gateway_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.registered_gateway_arn = Some(input.into());
self
}
pub fn set_registered_gateway_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.registered_gateway_arn = input;
self
}
pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn aws_region(mut self, input: impl Into<std::string::String>) -> Self {
self.aws_region = Some(input.into());
self
}
pub fn set_aws_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.aws_region = input;
self
}
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
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 health(mut self, input: crate::model::ConnectionHealth) -> Self {
self.health = Some(input);
self
}
pub fn set_health(
mut self,
input: std::option::Option<crate::model::ConnectionHealth>,
) -> Self {
self.health = input;
self
}
pub fn build(self) -> crate::model::NetworkTelemetry {
crate::model::NetworkTelemetry {
registered_gateway_arn: self.registered_gateway_arn,
core_network_id: self.core_network_id,
aws_region: self.aws_region,
account_id: self.account_id,
resource_type: self.resource_type,
resource_id: self.resource_id,
resource_arn: self.resource_arn,
address: self.address,
health: self.health,
}
}
}
}
impl NetworkTelemetry {
pub fn builder() -> crate::model::network_telemetry::Builder {
crate::model::network_telemetry::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConnectionHealth {
pub r#type: std::option::Option<crate::model::ConnectionType>,
pub status: std::option::Option<crate::model::ConnectionStatus>,
pub timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl ConnectionHealth {
pub fn r#type(&self) -> std::option::Option<&crate::model::ConnectionType> {
self.r#type.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::ConnectionStatus> {
self.status.as_ref()
}
pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.timestamp.as_ref()
}
}
impl std::fmt::Debug for ConnectionHealth {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConnectionHealth");
formatter.field("r#type", &self.r#type);
formatter.field("status", &self.status);
formatter.field("timestamp", &self.timestamp);
formatter.finish()
}
}
pub mod connection_health {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) r#type: std::option::Option<crate::model::ConnectionType>,
pub(crate) status: std::option::Option<crate::model::ConnectionStatus>,
pub(crate) timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn r#type(mut self, input: crate::model::ConnectionType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(
mut self,
input: std::option::Option<crate::model::ConnectionType>,
) -> Self {
self.r#type = input;
self
}
pub fn status(mut self, input: crate::model::ConnectionStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ConnectionStatus>,
) -> Self {
self.status = input;
self
}
pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.timestamp = Some(input);
self
}
pub fn set_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.timestamp = input;
self
}
pub fn build(self) -> crate::model::ConnectionHealth {
crate::model::ConnectionHealth {
r#type: self.r#type,
status: self.status,
timestamp: self.timestamp,
}
}
}
}
impl ConnectionHealth {
pub fn builder() -> crate::model::connection_health::Builder {
crate::model::connection_health::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 ConnectionStatus {
#[allow(missing_docs)] Down,
#[allow(missing_docs)] Up,
Unknown(String),
}
impl std::convert::From<&str> for ConnectionStatus {
fn from(s: &str) -> Self {
match s {
"DOWN" => ConnectionStatus::Down,
"UP" => ConnectionStatus::Up,
other => ConnectionStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ConnectionStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ConnectionStatus::from(s))
}
}
impl ConnectionStatus {
pub fn as_str(&self) -> &str {
match self {
ConnectionStatus::Down => "DOWN",
ConnectionStatus::Up => "UP",
ConnectionStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["DOWN", "UP"]
}
}
impl AsRef<str> for ConnectionStatus {
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 ConnectionType {
#[allow(missing_docs)] Bgp,
#[allow(missing_docs)] Ipsec,
Unknown(String),
}
impl std::convert::From<&str> for ConnectionType {
fn from(s: &str) -> Self {
match s {
"BGP" => ConnectionType::Bgp,
"IPSEC" => ConnectionType::Ipsec,
other => ConnectionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ConnectionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ConnectionType::from(s))
}
}
impl ConnectionType {
pub fn as_str(&self) -> &str {
match self {
ConnectionType::Bgp => "BGP",
ConnectionType::Ipsec => "IPSEC",
ConnectionType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["BGP", "IPSEC"]
}
}
impl AsRef<str> for ConnectionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NetworkRoute {
pub destination_cidr_block: std::option::Option<std::string::String>,
pub destinations: std::option::Option<std::vec::Vec<crate::model::NetworkRouteDestination>>,
pub prefix_list_id: std::option::Option<std::string::String>,
pub state: std::option::Option<crate::model::RouteState>,
pub r#type: std::option::Option<crate::model::RouteType>,
}
impl NetworkRoute {
pub fn destination_cidr_block(&self) -> std::option::Option<&str> {
self.destination_cidr_block.as_deref()
}
pub fn destinations(&self) -> std::option::Option<&[crate::model::NetworkRouteDestination]> {
self.destinations.as_deref()
}
pub fn prefix_list_id(&self) -> std::option::Option<&str> {
self.prefix_list_id.as_deref()
}
pub fn state(&self) -> std::option::Option<&crate::model::RouteState> {
self.state.as_ref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::RouteType> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for NetworkRoute {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NetworkRoute");
formatter.field("destination_cidr_block", &self.destination_cidr_block);
formatter.field("destinations", &self.destinations);
formatter.field("prefix_list_id", &self.prefix_list_id);
formatter.field("state", &self.state);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
pub mod network_route {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination_cidr_block: std::option::Option<std::string::String>,
pub(crate) destinations:
std::option::Option<std::vec::Vec<crate::model::NetworkRouteDestination>>,
pub(crate) prefix_list_id: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::RouteState>,
pub(crate) r#type: std::option::Option<crate::model::RouteType>,
}
impl Builder {
pub fn destination_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_cidr_block = Some(input.into());
self
}
pub fn set_destination_cidr_block(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_cidr_block = input;
self
}
pub fn destinations(mut self, input: crate::model::NetworkRouteDestination) -> Self {
let mut v = self.destinations.unwrap_or_default();
v.push(input);
self.destinations = Some(v);
self
}
pub fn set_destinations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NetworkRouteDestination>>,
) -> Self {
self.destinations = input;
self
}
pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
self.prefix_list_id = Some(input.into());
self
}
pub fn set_prefix_list_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.prefix_list_id = input;
self
}
pub fn state(mut self, input: crate::model::RouteState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(mut self, input: std::option::Option<crate::model::RouteState>) -> Self {
self.state = input;
self
}
pub fn r#type(mut self, input: crate::model::RouteType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::RouteType>) -> Self {
self.r#type = input;
self
}
pub fn build(self) -> crate::model::NetworkRoute {
crate::model::NetworkRoute {
destination_cidr_block: self.destination_cidr_block,
destinations: self.destinations,
prefix_list_id: self.prefix_list_id,
state: self.state,
r#type: self.r#type,
}
}
}
}
impl NetworkRoute {
pub fn builder() -> crate::model::network_route::Builder {
crate::model::network_route::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 RouteType {
#[allow(missing_docs)] Propagated,
#[allow(missing_docs)] Static,
Unknown(String),
}
impl std::convert::From<&str> for RouteType {
fn from(s: &str) -> Self {
match s {
"PROPAGATED" => RouteType::Propagated,
"STATIC" => RouteType::Static,
other => RouteType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RouteType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RouteType::from(s))
}
}
impl RouteType {
pub fn as_str(&self) -> &str {
match self {
RouteType::Propagated => "PROPAGATED",
RouteType::Static => "STATIC",
RouteType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["PROPAGATED", "STATIC"]
}
}
impl AsRef<str> for RouteType {
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 RouteState {
#[allow(missing_docs)] Active,
#[allow(missing_docs)] Blackhole,
Unknown(String),
}
impl std::convert::From<&str> for RouteState {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => RouteState::Active,
"BLACKHOLE" => RouteState::Blackhole,
other => RouteState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RouteState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RouteState::from(s))
}
}
impl RouteState {
pub fn as_str(&self) -> &str {
match self {
RouteState::Active => "ACTIVE",
RouteState::Blackhole => "BLACKHOLE",
RouteState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ACTIVE", "BLACKHOLE"]
}
}
impl AsRef<str> for RouteState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NetworkRouteDestination {
pub core_network_attachment_id: std::option::Option<std::string::String>,
pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
pub segment_name: std::option::Option<std::string::String>,
pub edge_location: std::option::Option<std::string::String>,
pub resource_type: std::option::Option<std::string::String>,
pub resource_id: std::option::Option<std::string::String>,
}
impl NetworkRouteDestination {
pub fn core_network_attachment_id(&self) -> std::option::Option<&str> {
self.core_network_attachment_id.as_deref()
}
pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
self.transit_gateway_attachment_id.as_deref()
}
pub fn segment_name(&self) -> std::option::Option<&str> {
self.segment_name.as_deref()
}
pub fn edge_location(&self) -> std::option::Option<&str> {
self.edge_location.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
}
impl std::fmt::Debug for NetworkRouteDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NetworkRouteDestination");
formatter.field(
"core_network_attachment_id",
&self.core_network_attachment_id,
);
formatter.field(
"transit_gateway_attachment_id",
&self.transit_gateway_attachment_id,
);
formatter.field("segment_name", &self.segment_name);
formatter.field("edge_location", &self.edge_location);
formatter.field("resource_type", &self.resource_type);
formatter.field("resource_id", &self.resource_id);
formatter.finish()
}
}
pub mod network_route_destination {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_attachment_id: std::option::Option<std::string::String>,
pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
pub(crate) segment_name: std::option::Option<std::string::String>,
pub(crate) edge_location: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn core_network_attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_attachment_id = Some(input.into());
self
}
pub fn set_core_network_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_attachment_id = input;
self
}
pub fn transit_gateway_attachment_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.transit_gateway_attachment_id = Some(input.into());
self
}
pub fn set_transit_gateway_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transit_gateway_attachment_id = input;
self
}
pub fn segment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.segment_name = Some(input.into());
self
}
pub fn set_segment_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.segment_name = input;
self
}
pub fn edge_location(mut self, input: impl Into<std::string::String>) -> Self {
self.edge_location = Some(input.into());
self
}
pub fn set_edge_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.edge_location = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn build(self) -> crate::model::NetworkRouteDestination {
crate::model::NetworkRouteDestination {
core_network_attachment_id: self.core_network_attachment_id,
transit_gateway_attachment_id: self.transit_gateway_attachment_id,
segment_name: self.segment_name,
edge_location: self.edge_location,
resource_type: self.resource_type,
resource_id: self.resource_id,
}
}
}
}
impl NetworkRouteDestination {
pub fn builder() -> crate::model::network_route_destination::Builder {
crate::model::network_route_destination::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 RouteTableType {
#[allow(missing_docs)] CoreNetworkSegment,
#[allow(missing_docs)] TransitGatewayRouteTable,
Unknown(String),
}
impl std::convert::From<&str> for RouteTableType {
fn from(s: &str) -> Self {
match s {
"CORE_NETWORK_SEGMENT" => RouteTableType::CoreNetworkSegment,
"TRANSIT_GATEWAY_ROUTE_TABLE" => RouteTableType::TransitGatewayRouteTable,
other => RouteTableType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RouteTableType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RouteTableType::from(s))
}
}
impl RouteTableType {
pub fn as_str(&self) -> &str {
match self {
RouteTableType::CoreNetworkSegment => "CORE_NETWORK_SEGMENT",
RouteTableType::TransitGatewayRouteTable => "TRANSIT_GATEWAY_ROUTE_TABLE",
RouteTableType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["CORE_NETWORK_SEGMENT", "TRANSIT_GATEWAY_ROUTE_TABLE"]
}
}
impl AsRef<str> for RouteTableType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CoreNetworkSegmentEdgeIdentifier {
pub core_network_id: std::option::Option<std::string::String>,
pub segment_name: std::option::Option<std::string::String>,
pub edge_location: std::option::Option<std::string::String>,
}
impl CoreNetworkSegmentEdgeIdentifier {
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn segment_name(&self) -> std::option::Option<&str> {
self.segment_name.as_deref()
}
pub fn edge_location(&self) -> std::option::Option<&str> {
self.edge_location.as_deref()
}
}
impl std::fmt::Debug for CoreNetworkSegmentEdgeIdentifier {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetworkSegmentEdgeIdentifier");
formatter.field("core_network_id", &self.core_network_id);
formatter.field("segment_name", &self.segment_name);
formatter.field("edge_location", &self.edge_location);
formatter.finish()
}
}
pub mod core_network_segment_edge_identifier {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_id: std::option::Option<std::string::String>,
pub(crate) segment_name: std::option::Option<std::string::String>,
pub(crate) edge_location: std::option::Option<std::string::String>,
}
impl Builder {
pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn segment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.segment_name = Some(input.into());
self
}
pub fn set_segment_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.segment_name = input;
self
}
pub fn edge_location(mut self, input: impl Into<std::string::String>) -> Self {
self.edge_location = Some(input.into());
self
}
pub fn set_edge_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.edge_location = input;
self
}
pub fn build(self) -> crate::model::CoreNetworkSegmentEdgeIdentifier {
crate::model::CoreNetworkSegmentEdgeIdentifier {
core_network_id: self.core_network_id,
segment_name: self.segment_name,
edge_location: self.edge_location,
}
}
}
}
impl CoreNetworkSegmentEdgeIdentifier {
pub fn builder() -> crate::model::core_network_segment_edge_identifier::Builder {
crate::model::core_network_segment_edge_identifier::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RouteTableIdentifier {
pub transit_gateway_route_table_arn: std::option::Option<std::string::String>,
pub core_network_segment_edge:
std::option::Option<crate::model::CoreNetworkSegmentEdgeIdentifier>,
}
impl RouteTableIdentifier {
pub fn transit_gateway_route_table_arn(&self) -> std::option::Option<&str> {
self.transit_gateway_route_table_arn.as_deref()
}
pub fn core_network_segment_edge(
&self,
) -> std::option::Option<&crate::model::CoreNetworkSegmentEdgeIdentifier> {
self.core_network_segment_edge.as_ref()
}
}
impl std::fmt::Debug for RouteTableIdentifier {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RouteTableIdentifier");
formatter.field(
"transit_gateway_route_table_arn",
&self.transit_gateway_route_table_arn,
);
formatter.field("core_network_segment_edge", &self.core_network_segment_edge);
formatter.finish()
}
}
pub mod route_table_identifier {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) transit_gateway_route_table_arn: std::option::Option<std::string::String>,
pub(crate) core_network_segment_edge:
std::option::Option<crate::model::CoreNetworkSegmentEdgeIdentifier>,
}
impl Builder {
pub fn transit_gateway_route_table_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.transit_gateway_route_table_arn = Some(input.into());
self
}
pub fn set_transit_gateway_route_table_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transit_gateway_route_table_arn = input;
self
}
pub fn core_network_segment_edge(
mut self,
input: crate::model::CoreNetworkSegmentEdgeIdentifier,
) -> Self {
self.core_network_segment_edge = Some(input);
self
}
pub fn set_core_network_segment_edge(
mut self,
input: std::option::Option<crate::model::CoreNetworkSegmentEdgeIdentifier>,
) -> Self {
self.core_network_segment_edge = input;
self
}
pub fn build(self) -> crate::model::RouteTableIdentifier {
crate::model::RouteTableIdentifier {
transit_gateway_route_table_arn: self.transit_gateway_route_table_arn,
core_network_segment_edge: self.core_network_segment_edge,
}
}
}
}
impl RouteTableIdentifier {
pub fn builder() -> crate::model::route_table_identifier::Builder {
crate::model::route_table_identifier::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NetworkResource {
pub registered_gateway_arn: std::option::Option<std::string::String>,
pub core_network_id: std::option::Option<std::string::String>,
pub aws_region: std::option::Option<std::string::String>,
pub account_id: std::option::Option<std::string::String>,
pub resource_type: std::option::Option<std::string::String>,
pub resource_id: std::option::Option<std::string::String>,
pub resource_arn: std::option::Option<std::string::String>,
pub definition: std::option::Option<std::string::String>,
pub definition_timestamp: std::option::Option<aws_smithy_types::DateTime>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub metadata:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl NetworkResource {
pub fn registered_gateway_arn(&self) -> std::option::Option<&str> {
self.registered_gateway_arn.as_deref()
}
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn aws_region(&self) -> std::option::Option<&str> {
self.aws_region.as_deref()
}
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn definition(&self) -> std::option::Option<&str> {
self.definition.as_deref()
}
pub fn definition_timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.definition_timestamp.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn metadata(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.metadata.as_ref()
}
}
impl std::fmt::Debug for NetworkResource {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NetworkResource");
formatter.field("registered_gateway_arn", &self.registered_gateway_arn);
formatter.field("core_network_id", &self.core_network_id);
formatter.field("aws_region", &self.aws_region);
formatter.field("account_id", &self.account_id);
formatter.field("resource_type", &self.resource_type);
formatter.field("resource_id", &self.resource_id);
formatter.field("resource_arn", &self.resource_arn);
formatter.field("definition", &self.definition);
formatter.field("definition_timestamp", &self.definition_timestamp);
formatter.field("tags", &self.tags);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
pub mod network_resource {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) registered_gateway_arn: std::option::Option<std::string::String>,
pub(crate) core_network_id: std::option::Option<std::string::String>,
pub(crate) aws_region: std::option::Option<std::string::String>,
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) definition: std::option::Option<std::string::String>,
pub(crate) definition_timestamp: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) metadata: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn registered_gateway_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.registered_gateway_arn = Some(input.into());
self
}
pub fn set_registered_gateway_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.registered_gateway_arn = input;
self
}
pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn aws_region(mut self, input: impl Into<std::string::String>) -> Self {
self.aws_region = Some(input.into());
self
}
pub fn set_aws_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.aws_region = input;
self
}
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn definition(mut self, input: impl Into<std::string::String>) -> Self {
self.definition = Some(input.into());
self
}
pub fn set_definition(mut self, input: std::option::Option<std::string::String>) -> Self {
self.definition = input;
self
}
pub fn definition_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.definition_timestamp = Some(input);
self
}
pub fn set_definition_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.definition_timestamp = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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 metadata(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.metadata.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.metadata = Some(hash_map);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::model::NetworkResource {
crate::model::NetworkResource {
registered_gateway_arn: self.registered_gateway_arn,
core_network_id: self.core_network_id,
aws_region: self.aws_region,
account_id: self.account_id,
resource_type: self.resource_type,
resource_id: self.resource_id,
resource_arn: self.resource_arn,
definition: self.definition,
definition_timestamp: self.definition_timestamp,
tags: self.tags,
metadata: self.metadata,
}
}
}
}
impl NetworkResource {
pub fn builder() -> crate::model::network_resource::Builder {
crate::model::network_resource::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Relationship {
pub from: std::option::Option<std::string::String>,
pub to: std::option::Option<std::string::String>,
}
impl Relationship {
pub fn from(&self) -> std::option::Option<&str> {
self.from.as_deref()
}
pub fn to(&self) -> std::option::Option<&str> {
self.to.as_deref()
}
}
impl std::fmt::Debug for Relationship {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Relationship");
formatter.field("from", &self.from);
formatter.field("to", &self.to);
formatter.finish()
}
}
pub mod relationship {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) from: std::option::Option<std::string::String>,
pub(crate) to: std::option::Option<std::string::String>,
}
impl Builder {
pub fn from(mut self, input: impl Into<std::string::String>) -> Self {
self.from = Some(input.into());
self
}
pub fn set_from(mut self, input: std::option::Option<std::string::String>) -> Self {
self.from = input;
self
}
pub fn to(mut self, input: impl Into<std::string::String>) -> Self {
self.to = Some(input.into());
self
}
pub fn set_to(mut self, input: std::option::Option<std::string::String>) -> Self {
self.to = input;
self
}
pub fn build(self) -> crate::model::Relationship {
crate::model::Relationship {
from: self.from,
to: self.to,
}
}
}
}
impl Relationship {
pub fn builder() -> crate::model::relationship::Builder {
crate::model::relationship::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NetworkResourceCount {
pub resource_type: std::option::Option<std::string::String>,
pub count: std::option::Option<i32>,
}
impl NetworkResourceCount {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn count(&self) -> std::option::Option<i32> {
self.count
}
}
impl std::fmt::Debug for NetworkResourceCount {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NetworkResourceCount");
formatter.field("resource_type", &self.resource_type);
formatter.field("count", &self.count);
formatter.finish()
}
}
pub mod network_resource_count {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) count: std::option::Option<i32>,
}
impl Builder {
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn count(mut self, input: i32) -> Self {
self.count = Some(input);
self
}
pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
self.count = input;
self
}
pub fn build(self) -> crate::model::NetworkResourceCount {
crate::model::NetworkResourceCount {
resource_type: self.resource_type,
count: self.count,
}
}
}
}
impl NetworkResourceCount {
pub fn builder() -> crate::model::network_resource_count::Builder {
crate::model::network_resource_count::Builder::default()
}
}
#[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 LinkAssociation {
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
pub fn link_id(&self) -> std::option::Option<&str> {
self.link_id.as_deref()
}
pub fn link_association_state(
&self,
) -> std::option::Option<&crate::model::LinkAssociationState> {
self.link_association_state.as_ref()
}
}
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 CustomerGatewayAssociation {
pub fn customer_gateway_arn(&self) -> std::option::Option<&str> {
self.customer_gateway_arn.as_deref()
}
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
pub fn link_id(&self) -> std::option::Option<&str> {
self.link_id.as_deref()
}
pub fn state(&self) -> std::option::Option<&crate::model::CustomerGatewayAssociationState> {
self.state.as_ref()
}
}
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()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CoreNetworkChange {
pub r#type: std::option::Option<crate::model::ChangeType>,
pub action: std::option::Option<crate::model::ChangeAction>,
pub identifier: std::option::Option<std::string::String>,
pub previous_values: std::option::Option<crate::model::CoreNetworkChangeValues>,
pub new_values: std::option::Option<crate::model::CoreNetworkChangeValues>,
}
impl CoreNetworkChange {
pub fn r#type(&self) -> std::option::Option<&crate::model::ChangeType> {
self.r#type.as_ref()
}
pub fn action(&self) -> std::option::Option<&crate::model::ChangeAction> {
self.action.as_ref()
}
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn previous_values(&self) -> std::option::Option<&crate::model::CoreNetworkChangeValues> {
self.previous_values.as_ref()
}
pub fn new_values(&self) -> std::option::Option<&crate::model::CoreNetworkChangeValues> {
self.new_values.as_ref()
}
}
impl std::fmt::Debug for CoreNetworkChange {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetworkChange");
formatter.field("r#type", &self.r#type);
formatter.field("action", &self.action);
formatter.field("identifier", &self.identifier);
formatter.field("previous_values", &self.previous_values);
formatter.field("new_values", &self.new_values);
formatter.finish()
}
}
pub mod core_network_change {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) r#type: std::option::Option<crate::model::ChangeType>,
pub(crate) action: std::option::Option<crate::model::ChangeAction>,
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) previous_values: std::option::Option<crate::model::CoreNetworkChangeValues>,
pub(crate) new_values: std::option::Option<crate::model::CoreNetworkChangeValues>,
}
impl Builder {
pub fn r#type(mut self, input: crate::model::ChangeType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::ChangeType>) -> Self {
self.r#type = input;
self
}
pub fn action(mut self, input: crate::model::ChangeAction) -> Self {
self.action = Some(input);
self
}
pub fn set_action(
mut self,
input: std::option::Option<crate::model::ChangeAction>,
) -> Self {
self.action = input;
self
}
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn previous_values(mut self, input: crate::model::CoreNetworkChangeValues) -> Self {
self.previous_values = Some(input);
self
}
pub fn set_previous_values(
mut self,
input: std::option::Option<crate::model::CoreNetworkChangeValues>,
) -> Self {
self.previous_values = input;
self
}
pub fn new_values(mut self, input: crate::model::CoreNetworkChangeValues) -> Self {
self.new_values = Some(input);
self
}
pub fn set_new_values(
mut self,
input: std::option::Option<crate::model::CoreNetworkChangeValues>,
) -> Self {
self.new_values = input;
self
}
pub fn build(self) -> crate::model::CoreNetworkChange {
crate::model::CoreNetworkChange {
r#type: self.r#type,
action: self.action,
identifier: self.identifier,
previous_values: self.previous_values,
new_values: self.new_values,
}
}
}
}
impl CoreNetworkChange {
pub fn builder() -> crate::model::core_network_change::Builder {
crate::model::core_network_change::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CoreNetworkChangeValues {
pub segment_name: std::option::Option<std::string::String>,
pub edge_locations: std::option::Option<std::vec::Vec<std::string::String>>,
pub asn: std::option::Option<i64>,
pub cidr: std::option::Option<std::string::String>,
pub destination_identifier: std::option::Option<std::string::String>,
pub inside_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
pub shared_segments: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl CoreNetworkChangeValues {
pub fn segment_name(&self) -> std::option::Option<&str> {
self.segment_name.as_deref()
}
pub fn edge_locations(&self) -> std::option::Option<&[std::string::String]> {
self.edge_locations.as_deref()
}
pub fn asn(&self) -> std::option::Option<i64> {
self.asn
}
pub fn cidr(&self) -> std::option::Option<&str> {
self.cidr.as_deref()
}
pub fn destination_identifier(&self) -> std::option::Option<&str> {
self.destination_identifier.as_deref()
}
pub fn inside_cidr_blocks(&self) -> std::option::Option<&[std::string::String]> {
self.inside_cidr_blocks.as_deref()
}
pub fn shared_segments(&self) -> std::option::Option<&[std::string::String]> {
self.shared_segments.as_deref()
}
}
impl std::fmt::Debug for CoreNetworkChangeValues {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CoreNetworkChangeValues");
formatter.field("segment_name", &self.segment_name);
formatter.field("edge_locations", &self.edge_locations);
formatter.field("asn", &self.asn);
formatter.field("cidr", &self.cidr);
formatter.field("destination_identifier", &self.destination_identifier);
formatter.field("inside_cidr_blocks", &self.inside_cidr_blocks);
formatter.field("shared_segments", &self.shared_segments);
formatter.finish()
}
}
pub mod core_network_change_values {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) segment_name: std::option::Option<std::string::String>,
pub(crate) edge_locations: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) asn: std::option::Option<i64>,
pub(crate) cidr: std::option::Option<std::string::String>,
pub(crate) destination_identifier: std::option::Option<std::string::String>,
pub(crate) inside_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) shared_segments: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn segment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.segment_name = Some(input.into());
self
}
pub fn set_segment_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.segment_name = input;
self
}
pub fn edge_locations(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.edge_locations.unwrap_or_default();
v.push(input.into());
self.edge_locations = Some(v);
self
}
pub fn set_edge_locations(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.edge_locations = input;
self
}
pub fn asn(mut self, input: i64) -> Self {
self.asn = Some(input);
self
}
pub fn set_asn(mut self, input: std::option::Option<i64>) -> Self {
self.asn = input;
self
}
pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
self.cidr = Some(input.into());
self
}
pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
self.cidr = input;
self
}
pub fn destination_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_identifier = Some(input.into());
self
}
pub fn set_destination_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_identifier = input;
self
}
pub fn inside_cidr_blocks(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.inside_cidr_blocks.unwrap_or_default();
v.push(input.into());
self.inside_cidr_blocks = Some(v);
self
}
pub fn set_inside_cidr_blocks(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inside_cidr_blocks = input;
self
}
pub fn shared_segments(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.shared_segments.unwrap_or_default();
v.push(input.into());
self.shared_segments = Some(v);
self
}
pub fn set_shared_segments(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.shared_segments = input;
self
}
pub fn build(self) -> crate::model::CoreNetworkChangeValues {
crate::model::CoreNetworkChangeValues {
segment_name: self.segment_name,
edge_locations: self.edge_locations,
asn: self.asn,
cidr: self.cidr,
destination_identifier: self.destination_identifier,
inside_cidr_blocks: self.inside_cidr_blocks,
shared_segments: self.shared_segments,
}
}
}
}
impl CoreNetworkChangeValues {
pub fn builder() -> crate::model::core_network_change_values::Builder {
crate::model::core_network_change_values::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 ChangeAction {
#[allow(missing_docs)] Add,
#[allow(missing_docs)] Modify,
#[allow(missing_docs)] Remove,
Unknown(String),
}
impl std::convert::From<&str> for ChangeAction {
fn from(s: &str) -> Self {
match s {
"ADD" => ChangeAction::Add,
"MODIFY" => ChangeAction::Modify,
"REMOVE" => ChangeAction::Remove,
other => ChangeAction::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ChangeAction {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ChangeAction::from(s))
}
}
impl ChangeAction {
pub fn as_str(&self) -> &str {
match self {
ChangeAction::Add => "ADD",
ChangeAction::Modify => "MODIFY",
ChangeAction::Remove => "REMOVE",
ChangeAction::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ADD", "MODIFY", "REMOVE"]
}
}
impl AsRef<str> for ChangeAction {
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 ChangeType {
#[allow(missing_docs)] AttachmentMapping,
#[allow(missing_docs)] AttachmentRoutePropagation,
#[allow(missing_docs)] AttachmentRouteStatic,
#[allow(missing_docs)] CoreNetworkEdge,
#[allow(missing_docs)] CoreNetworkSegment,
Unknown(String),
}
impl std::convert::From<&str> for ChangeType {
fn from(s: &str) -> Self {
match s {
"ATTACHMENT_MAPPING" => ChangeType::AttachmentMapping,
"ATTACHMENT_ROUTE_PROPAGATION" => ChangeType::AttachmentRoutePropagation,
"ATTACHMENT_ROUTE_STATIC" => ChangeType::AttachmentRouteStatic,
"CORE_NETWORK_EDGE" => ChangeType::CoreNetworkEdge,
"CORE_NETWORK_SEGMENT" => ChangeType::CoreNetworkSegment,
other => ChangeType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ChangeType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ChangeType::from(s))
}
}
impl ChangeType {
pub fn as_str(&self) -> &str {
match self {
ChangeType::AttachmentMapping => "ATTACHMENT_MAPPING",
ChangeType::AttachmentRoutePropagation => "ATTACHMENT_ROUTE_PROPAGATION",
ChangeType::AttachmentRouteStatic => "ATTACHMENT_ROUTE_STATIC",
ChangeType::CoreNetworkEdge => "CORE_NETWORK_EDGE",
ChangeType::CoreNetworkSegment => "CORE_NETWORK_SEGMENT",
ChangeType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"ATTACHMENT_MAPPING",
"ATTACHMENT_ROUTE_PROPAGATION",
"ATTACHMENT_ROUTE_STATIC",
"CORE_NETWORK_EDGE",
"CORE_NETWORK_SEGMENT",
]
}
}
impl AsRef<str> for ChangeType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConnectPeerAssociation {
pub connect_peer_id: 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::ConnectPeerAssociationState>,
}
impl ConnectPeerAssociation {
pub fn connect_peer_id(&self) -> std::option::Option<&str> {
self.connect_peer_id.as_deref()
}
pub fn global_network_id(&self) -> std::option::Option<&str> {
self.global_network_id.as_deref()
}
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
pub fn link_id(&self) -> std::option::Option<&str> {
self.link_id.as_deref()
}
pub fn state(&self) -> std::option::Option<&crate::model::ConnectPeerAssociationState> {
self.state.as_ref()
}
}
impl std::fmt::Debug for ConnectPeerAssociation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConnectPeerAssociation");
formatter.field("connect_peer_id", &self.connect_peer_id);
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 connect_peer_association {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) connect_peer_id: 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::ConnectPeerAssociationState>,
}
impl Builder {
pub fn connect_peer_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connect_peer_id = Some(input.into());
self
}
pub fn set_connect_peer_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connect_peer_id = 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::ConnectPeerAssociationState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::ConnectPeerAssociationState>,
) -> Self {
self.state = input;
self
}
pub fn build(self) -> crate::model::ConnectPeerAssociation {
crate::model::ConnectPeerAssociation {
connect_peer_id: self.connect_peer_id,
global_network_id: self.global_network_id,
device_id: self.device_id,
link_id: self.link_id,
state: self.state,
}
}
}
}
impl ConnectPeerAssociation {
pub fn builder() -> crate::model::connect_peer_association::Builder {
crate::model::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 ConnectPeerAssociationState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleted,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
Unknown(String),
}
impl std::convert::From<&str> for ConnectPeerAssociationState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => ConnectPeerAssociationState::Available,
"DELETED" => ConnectPeerAssociationState::Deleted,
"DELETING" => ConnectPeerAssociationState::Deleting,
"PENDING" => ConnectPeerAssociationState::Pending,
other => ConnectPeerAssociationState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ConnectPeerAssociationState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ConnectPeerAssociationState::from(s))
}
}
impl ConnectPeerAssociationState {
pub fn as_str(&self) -> &str {
match self {
ConnectPeerAssociationState::Available => "AVAILABLE",
ConnectPeerAssociationState::Deleted => "DELETED",
ConnectPeerAssociationState::Deleting => "DELETING",
ConnectPeerAssociationState::Pending => "PENDING",
ConnectPeerAssociationState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETED", "DELETING", "PENDING"]
}
}
impl AsRef<str> for ConnectPeerAssociationState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConnectPeer {
pub core_network_id: std::option::Option<std::string::String>,
pub connect_attachment_id: std::option::Option<std::string::String>,
pub connect_peer_id: std::option::Option<std::string::String>,
pub edge_location: std::option::Option<std::string::String>,
pub state: std::option::Option<crate::model::ConnectPeerState>,
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
pub configuration: std::option::Option<crate::model::ConnectPeerConfiguration>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ConnectPeer {
pub fn core_network_id(&self) -> std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn connect_attachment_id(&self) -> std::option::Option<&str> {
self.connect_attachment_id.as_deref()
}
pub fn connect_peer_id(&self) -> std::option::Option<&str> {
self.connect_peer_id.as_deref()
}
pub fn edge_location(&self) -> std::option::Option<&str> {
self.edge_location.as_deref()
}
pub fn state(&self) -> std::option::Option<&crate::model::ConnectPeerState> {
self.state.as_ref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn configuration(&self) -> std::option::Option<&crate::model::ConnectPeerConfiguration> {
self.configuration.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for ConnectPeer {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConnectPeer");
formatter.field("core_network_id", &self.core_network_id);
formatter.field("connect_attachment_id", &self.connect_attachment_id);
formatter.field("connect_peer_id", &self.connect_peer_id);
formatter.field("edge_location", &self.edge_location);
formatter.field("state", &self.state);
formatter.field("created_at", &self.created_at);
formatter.field("configuration", &self.configuration);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod connect_peer {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_id: std::option::Option<std::string::String>,
pub(crate) connect_attachment_id: std::option::Option<std::string::String>,
pub(crate) connect_peer_id: std::option::Option<std::string::String>,
pub(crate) edge_location: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::ConnectPeerState>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) configuration: std::option::Option<crate::model::ConnectPeerConfiguration>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_id = Some(input.into());
self
}
pub fn set_core_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_id = input;
self
}
pub fn connect_attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connect_attachment_id = Some(input.into());
self
}
pub fn set_connect_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connect_attachment_id = input;
self
}
pub fn connect_peer_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connect_peer_id = Some(input.into());
self
}
pub fn set_connect_peer_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connect_peer_id = input;
self
}
pub fn edge_location(mut self, input: impl Into<std::string::String>) -> Self {
self.edge_location = Some(input.into());
self
}
pub fn set_edge_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.edge_location = input;
self
}
pub fn state(mut self, input: crate::model::ConnectPeerState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::ConnectPeerState>,
) -> Self {
self.state = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
pub fn configuration(mut self, input: crate::model::ConnectPeerConfiguration) -> Self {
self.configuration = Some(input);
self
}
pub fn set_configuration(
mut self,
input: std::option::Option<crate::model::ConnectPeerConfiguration>,
) -> Self {
self.configuration = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
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::ConnectPeer {
crate::model::ConnectPeer {
core_network_id: self.core_network_id,
connect_attachment_id: self.connect_attachment_id,
connect_peer_id: self.connect_peer_id,
edge_location: self.edge_location,
state: self.state,
created_at: self.created_at,
configuration: self.configuration,
tags: self.tags,
}
}
}
}
impl ConnectPeer {
pub fn builder() -> crate::model::connect_peer::Builder {
crate::model::connect_peer::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConnectPeerConfiguration {
pub core_network_address: std::option::Option<std::string::String>,
pub peer_address: std::option::Option<std::string::String>,
pub inside_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
pub protocol: std::option::Option<crate::model::TunnelProtocol>,
pub bgp_configurations:
std::option::Option<std::vec::Vec<crate::model::ConnectPeerBgpConfiguration>>,
}
impl ConnectPeerConfiguration {
pub fn core_network_address(&self) -> std::option::Option<&str> {
self.core_network_address.as_deref()
}
pub fn peer_address(&self) -> std::option::Option<&str> {
self.peer_address.as_deref()
}
pub fn inside_cidr_blocks(&self) -> std::option::Option<&[std::string::String]> {
self.inside_cidr_blocks.as_deref()
}
pub fn protocol(&self) -> std::option::Option<&crate::model::TunnelProtocol> {
self.protocol.as_ref()
}
pub fn bgp_configurations(
&self,
) -> std::option::Option<&[crate::model::ConnectPeerBgpConfiguration]> {
self.bgp_configurations.as_deref()
}
}
impl std::fmt::Debug for ConnectPeerConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConnectPeerConfiguration");
formatter.field("core_network_address", &self.core_network_address);
formatter.field("peer_address", &self.peer_address);
formatter.field("inside_cidr_blocks", &self.inside_cidr_blocks);
formatter.field("protocol", &self.protocol);
formatter.field("bgp_configurations", &self.bgp_configurations);
formatter.finish()
}
}
pub mod connect_peer_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_address: std::option::Option<std::string::String>,
pub(crate) peer_address: std::option::Option<std::string::String>,
pub(crate) inside_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) protocol: std::option::Option<crate::model::TunnelProtocol>,
pub(crate) bgp_configurations:
std::option::Option<std::vec::Vec<crate::model::ConnectPeerBgpConfiguration>>,
}
impl Builder {
pub fn core_network_address(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_address = Some(input.into());
self
}
pub fn set_core_network_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_address = input;
self
}
pub fn peer_address(mut self, input: impl Into<std::string::String>) -> Self {
self.peer_address = Some(input.into());
self
}
pub fn set_peer_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.peer_address = input;
self
}
pub fn inside_cidr_blocks(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.inside_cidr_blocks.unwrap_or_default();
v.push(input.into());
self.inside_cidr_blocks = Some(v);
self
}
pub fn set_inside_cidr_blocks(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inside_cidr_blocks = input;
self
}
pub fn protocol(mut self, input: crate::model::TunnelProtocol) -> Self {
self.protocol = Some(input);
self
}
pub fn set_protocol(
mut self,
input: std::option::Option<crate::model::TunnelProtocol>,
) -> Self {
self.protocol = input;
self
}
pub fn bgp_configurations(
mut self,
input: crate::model::ConnectPeerBgpConfiguration,
) -> Self {
let mut v = self.bgp_configurations.unwrap_or_default();
v.push(input);
self.bgp_configurations = Some(v);
self
}
pub fn set_bgp_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ConnectPeerBgpConfiguration>>,
) -> Self {
self.bgp_configurations = input;
self
}
pub fn build(self) -> crate::model::ConnectPeerConfiguration {
crate::model::ConnectPeerConfiguration {
core_network_address: self.core_network_address,
peer_address: self.peer_address,
inside_cidr_blocks: self.inside_cidr_blocks,
protocol: self.protocol,
bgp_configurations: self.bgp_configurations,
}
}
}
}
impl ConnectPeerConfiguration {
pub fn builder() -> crate::model::connect_peer_configuration::Builder {
crate::model::connect_peer_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConnectPeerBgpConfiguration {
pub core_network_asn: std::option::Option<i64>,
pub peer_asn: std::option::Option<i64>,
pub core_network_address: std::option::Option<std::string::String>,
pub peer_address: std::option::Option<std::string::String>,
}
impl ConnectPeerBgpConfiguration {
pub fn core_network_asn(&self) -> std::option::Option<i64> {
self.core_network_asn
}
pub fn peer_asn(&self) -> std::option::Option<i64> {
self.peer_asn
}
pub fn core_network_address(&self) -> std::option::Option<&str> {
self.core_network_address.as_deref()
}
pub fn peer_address(&self) -> std::option::Option<&str> {
self.peer_address.as_deref()
}
}
impl std::fmt::Debug for ConnectPeerBgpConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConnectPeerBgpConfiguration");
formatter.field("core_network_asn", &self.core_network_asn);
formatter.field("peer_asn", &self.peer_asn);
formatter.field("core_network_address", &self.core_network_address);
formatter.field("peer_address", &self.peer_address);
formatter.finish()
}
}
pub mod connect_peer_bgp_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) core_network_asn: std::option::Option<i64>,
pub(crate) peer_asn: std::option::Option<i64>,
pub(crate) core_network_address: std::option::Option<std::string::String>,
pub(crate) peer_address: std::option::Option<std::string::String>,
}
impl Builder {
pub fn core_network_asn(mut self, input: i64) -> Self {
self.core_network_asn = Some(input);
self
}
pub fn set_core_network_asn(mut self, input: std::option::Option<i64>) -> Self {
self.core_network_asn = input;
self
}
pub fn peer_asn(mut self, input: i64) -> Self {
self.peer_asn = Some(input);
self
}
pub fn set_peer_asn(mut self, input: std::option::Option<i64>) -> Self {
self.peer_asn = input;
self
}
pub fn core_network_address(mut self, input: impl Into<std::string::String>) -> Self {
self.core_network_address = Some(input.into());
self
}
pub fn set_core_network_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.core_network_address = input;
self
}
pub fn peer_address(mut self, input: impl Into<std::string::String>) -> Self {
self.peer_address = Some(input.into());
self
}
pub fn set_peer_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.peer_address = input;
self
}
pub fn build(self) -> crate::model::ConnectPeerBgpConfiguration {
crate::model::ConnectPeerBgpConfiguration {
core_network_asn: self.core_network_asn,
peer_asn: self.peer_asn,
core_network_address: self.core_network_address,
peer_address: self.peer_address,
}
}
}
}
impl ConnectPeerBgpConfiguration {
pub fn builder() -> crate::model::connect_peer_bgp_configuration::Builder {
crate::model::connect_peer_bgp_configuration::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 TunnelProtocol {
#[allow(missing_docs)] Gre,
Unknown(String),
}
impl std::convert::From<&str> for TunnelProtocol {
fn from(s: &str) -> Self {
match s {
"GRE" => TunnelProtocol::Gre,
other => TunnelProtocol::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TunnelProtocol {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TunnelProtocol::from(s))
}
}
impl TunnelProtocol {
pub fn as_str(&self) -> &str {
match self {
TunnelProtocol::Gre => "GRE",
TunnelProtocol::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["GRE"]
}
}
impl AsRef<str> for TunnelProtocol {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConnectAttachment {
pub attachment: std::option::Option<crate::model::Attachment>,
pub transport_attachment_id: std::option::Option<std::string::String>,
pub options: std::option::Option<crate::model::ConnectAttachmentOptions>,
}
impl ConnectAttachment {
pub fn attachment(&self) -> std::option::Option<&crate::model::Attachment> {
self.attachment.as_ref()
}
pub fn transport_attachment_id(&self) -> std::option::Option<&str> {
self.transport_attachment_id.as_deref()
}
pub fn options(&self) -> std::option::Option<&crate::model::ConnectAttachmentOptions> {
self.options.as_ref()
}
}
impl std::fmt::Debug for ConnectAttachment {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConnectAttachment");
formatter.field("attachment", &self.attachment);
formatter.field("transport_attachment_id", &self.transport_attachment_id);
formatter.field("options", &self.options);
formatter.finish()
}
}
pub mod connect_attachment {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) attachment: std::option::Option<crate::model::Attachment>,
pub(crate) transport_attachment_id: std::option::Option<std::string::String>,
pub(crate) options: std::option::Option<crate::model::ConnectAttachmentOptions>,
}
impl Builder {
pub fn attachment(mut self, input: crate::model::Attachment) -> Self {
self.attachment = Some(input);
self
}
pub fn set_attachment(
mut self,
input: std::option::Option<crate::model::Attachment>,
) -> Self {
self.attachment = input;
self
}
pub fn transport_attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.transport_attachment_id = Some(input.into());
self
}
pub fn set_transport_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transport_attachment_id = input;
self
}
pub fn options(mut self, input: crate::model::ConnectAttachmentOptions) -> Self {
self.options = Some(input);
self
}
pub fn set_options(
mut self,
input: std::option::Option<crate::model::ConnectAttachmentOptions>,
) -> Self {
self.options = input;
self
}
pub fn build(self) -> crate::model::ConnectAttachment {
crate::model::ConnectAttachment {
attachment: self.attachment,
transport_attachment_id: self.transport_attachment_id,
options: self.options,
}
}
}
}
impl ConnectAttachment {
pub fn builder() -> crate::model::connect_attachment::Builder {
crate::model::connect_attachment::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConnectAttachmentOptions {
pub protocol: std::option::Option<crate::model::TunnelProtocol>,
}
impl ConnectAttachmentOptions {
pub fn protocol(&self) -> std::option::Option<&crate::model::TunnelProtocol> {
self.protocol.as_ref()
}
}
impl std::fmt::Debug for ConnectAttachmentOptions {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConnectAttachmentOptions");
formatter.field("protocol", &self.protocol);
formatter.finish()
}
}
pub mod connect_attachment_options {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) protocol: std::option::Option<crate::model::TunnelProtocol>,
}
impl Builder {
pub fn protocol(mut self, input: crate::model::TunnelProtocol) -> Self {
self.protocol = Some(input);
self
}
pub fn set_protocol(
mut self,
input: std::option::Option<crate::model::TunnelProtocol>,
) -> Self {
self.protocol = input;
self
}
pub fn build(self) -> crate::model::ConnectAttachmentOptions {
crate::model::ConnectAttachmentOptions {
protocol: self.protocol,
}
}
}
}
impl ConnectAttachmentOptions {
pub fn builder() -> crate::model::connect_attachment_options::Builder {
crate::model::connect_attachment_options::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BgpOptions {
pub peer_asn: std::option::Option<i64>,
}
impl BgpOptions {
pub fn peer_asn(&self) -> std::option::Option<i64> {
self.peer_asn
}
}
impl std::fmt::Debug for BgpOptions {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BgpOptions");
formatter.field("peer_asn", &self.peer_asn);
formatter.finish()
}
}
pub mod bgp_options {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) peer_asn: std::option::Option<i64>,
}
impl Builder {
pub fn peer_asn(mut self, input: i64) -> Self {
self.peer_asn = Some(input);
self
}
pub fn set_peer_asn(mut self, input: std::option::Option<i64>) -> Self {
self.peer_asn = input;
self
}
pub fn build(self) -> crate::model::BgpOptions {
crate::model::BgpOptions {
peer_asn: self.peer_asn,
}
}
}
}
impl BgpOptions {
pub fn builder() -> crate::model::bgp_options::Builder {
crate::model::bgp_options::Builder::default()
}
}