#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RejectLinkOutput {
pub gateway_id: ::std::string::String,
pub peer_gateway_id: ::std::string::String,
pub status: crate::types::LinkStatus,
pub created_at: ::aws_smithy_types::DateTime,
pub updated_at: ::aws_smithy_types::DateTime,
pub direction: ::std::option::Option<crate::types::LinkDirection>,
pub flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>,
pub pending_flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>,
pub attributes: ::std::option::Option<crate::types::LinkAttributes>,
pub log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
pub connectivity_type: ::std::option::Option<crate::types::ConnectivityType>,
pub link_id: ::std::string::String,
_request_id: Option<String>,
}
impl RejectLinkOutput {
pub fn gateway_id(&self) -> &str {
use std::ops::Deref;
self.gateway_id.deref()
}
pub fn peer_gateway_id(&self) -> &str {
use std::ops::Deref;
self.peer_gateway_id.deref()
}
pub fn status(&self) -> &crate::types::LinkStatus {
&self.status
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
pub fn direction(&self) -> ::std::option::Option<&crate::types::LinkDirection> {
self.direction.as_ref()
}
pub fn flow_modules(&self) -> &[crate::types::ModuleConfiguration] {
self.flow_modules.as_deref().unwrap_or_default()
}
pub fn pending_flow_modules(&self) -> &[crate::types::ModuleConfiguration] {
self.pending_flow_modules.as_deref().unwrap_or_default()
}
pub fn attributes(&self) -> ::std::option::Option<&crate::types::LinkAttributes> {
self.attributes.as_ref()
}
pub fn log_settings(&self) -> ::std::option::Option<&crate::types::LinkLogSettings> {
self.log_settings.as_ref()
}
pub fn connectivity_type(&self) -> ::std::option::Option<&crate::types::ConnectivityType> {
self.connectivity_type.as_ref()
}
pub fn link_id(&self) -> &str {
use std::ops::Deref;
self.link_id.deref()
}
}
impl ::aws_types::request_id::RequestId for RejectLinkOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl RejectLinkOutput {
pub fn builder() -> crate::operation::reject_link::builders::RejectLinkOutputBuilder {
crate::operation::reject_link::builders::RejectLinkOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RejectLinkOutputBuilder {
pub(crate) gateway_id: ::std::option::Option<::std::string::String>,
pub(crate) peer_gateway_id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::LinkStatus>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) direction: ::std::option::Option<crate::types::LinkDirection>,
pub(crate) flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>,
pub(crate) pending_flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>,
pub(crate) attributes: ::std::option::Option<crate::types::LinkAttributes>,
pub(crate) log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
pub(crate) connectivity_type: ::std::option::Option<crate::types::ConnectivityType>,
pub(crate) link_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl RejectLinkOutputBuilder {
pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.gateway_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.gateway_id = input;
self
}
pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
&self.gateway_id
}
pub fn peer_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.peer_gateway_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_peer_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.peer_gateway_id = input;
self
}
pub fn get_peer_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
&self.peer_gateway_id
}
pub fn status(mut self, input: crate::types::LinkStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::LinkStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::LinkStatus> {
&self.status
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::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 get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::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 get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn direction(mut self, input: crate::types::LinkDirection) -> Self {
self.direction = ::std::option::Option::Some(input);
self
}
pub fn set_direction(mut self, input: ::std::option::Option<crate::types::LinkDirection>) -> Self {
self.direction = input;
self
}
pub fn get_direction(&self) -> &::std::option::Option<crate::types::LinkDirection> {
&self.direction
}
pub fn flow_modules(mut self, input: crate::types::ModuleConfiguration) -> Self {
let mut v = self.flow_modules.unwrap_or_default();
v.push(input);
self.flow_modules = ::std::option::Option::Some(v);
self
}
pub fn set_flow_modules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>) -> Self {
self.flow_modules = input;
self
}
pub fn get_flow_modules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>> {
&self.flow_modules
}
pub fn pending_flow_modules(mut self, input: crate::types::ModuleConfiguration) -> Self {
let mut v = self.pending_flow_modules.unwrap_or_default();
v.push(input);
self.pending_flow_modules = ::std::option::Option::Some(v);
self
}
pub fn set_pending_flow_modules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>) -> Self {
self.pending_flow_modules = input;
self
}
pub fn get_pending_flow_modules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>> {
&self.pending_flow_modules
}
pub fn attributes(mut self, input: crate::types::LinkAttributes) -> Self {
self.attributes = ::std::option::Option::Some(input);
self
}
pub fn set_attributes(mut self, input: ::std::option::Option<crate::types::LinkAttributes>) -> Self {
self.attributes = input;
self
}
pub fn get_attributes(&self) -> &::std::option::Option<crate::types::LinkAttributes> {
&self.attributes
}
pub fn log_settings(mut self, input: crate::types::LinkLogSettings) -> Self {
self.log_settings = ::std::option::Option::Some(input);
self
}
pub fn set_log_settings(mut self, input: ::std::option::Option<crate::types::LinkLogSettings>) -> Self {
self.log_settings = input;
self
}
pub fn get_log_settings(&self) -> &::std::option::Option<crate::types::LinkLogSettings> {
&self.log_settings
}
pub fn connectivity_type(mut self, input: crate::types::ConnectivityType) -> Self {
self.connectivity_type = ::std::option::Option::Some(input);
self
}
pub fn set_connectivity_type(mut self, input: ::std::option::Option<crate::types::ConnectivityType>) -> Self {
self.connectivity_type = input;
self
}
pub fn get_connectivity_type(&self) -> &::std::option::Option<crate::types::ConnectivityType> {
&self.connectivity_type
}
pub fn link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.link_id = ::std::option::Option::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 get_link_id(&self) -> &::std::option::Option<::std::string::String> {
&self.link_id
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> ::std::result::Result<crate::operation::reject_link::RejectLinkOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::reject_link::RejectLinkOutput {
gateway_id: self.gateway_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"gateway_id",
"gateway_id was not specified but it is required when building RejectLinkOutput",
)
})?,
peer_gateway_id: self.peer_gateway_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"peer_gateway_id",
"peer_gateway_id was not specified but it is required when building RejectLinkOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building RejectLinkOutput",
)
})?,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building RejectLinkOutput",
)
})?,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building RejectLinkOutput",
)
})?,
direction: self.direction,
flow_modules: self.flow_modules,
pending_flow_modules: self.pending_flow_modules,
attributes: self.attributes,
log_settings: self.log_settings,
connectivity_type: self.connectivity_type,
link_id: self.link_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"link_id",
"link_id was not specified but it is required when building RejectLinkOutput",
)
})?,
_request_id: self._request_id,
})
}
}