#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRequesterGatewayOutput {
pub status: crate::types::RequesterGatewayStatus,
pub domain_name: ::std::string::String,
pub description: ::std::option::Option<::std::string::String>,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub vpc_id: ::std::string::String,
pub subnet_ids: ::std::vec::Vec<::std::string::String>,
pub security_group_ids: ::std::vec::Vec<::std::string::String>,
pub gateway_id: ::std::string::String,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub active_links_count: ::std::option::Option<i32>,
pub total_links_count: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl GetRequesterGatewayOutput {
pub fn status(&self) -> &crate::types::RequesterGatewayStatus {
&self.status
}
pub fn domain_name(&self) -> &str {
use std::ops::Deref;
self.domain_name.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 updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
pub fn vpc_id(&self) -> &str {
use std::ops::Deref;
self.vpc_id.deref()
}
pub fn subnet_ids(&self) -> &[::std::string::String] {
use std::ops::Deref;
self.subnet_ids.deref()
}
pub fn security_group_ids(&self) -> &[::std::string::String] {
use std::ops::Deref;
self.security_group_ids.deref()
}
pub fn gateway_id(&self) -> &str {
use std::ops::Deref;
self.gateway_id.deref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
pub fn active_links_count(&self) -> ::std::option::Option<i32> {
self.active_links_count
}
pub fn total_links_count(&self) -> ::std::option::Option<i32> {
self.total_links_count
}
}
impl ::aws_types::request_id::RequestId for GetRequesterGatewayOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetRequesterGatewayOutput {
pub fn builder() -> crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder {
crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRequesterGatewayOutputBuilder {
pub(crate) status: ::std::option::Option<crate::types::RequesterGatewayStatus>,
pub(crate) domain_name: ::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) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) gateway_id: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) active_links_count: ::std::option::Option<i32>,
pub(crate) total_links_count: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl GetRequesterGatewayOutputBuilder {
pub fn status(mut self, input: crate::types::RequesterGatewayStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::RequesterGatewayStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::RequesterGatewayStatus> {
&self.status
}
pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_name = input;
self
}
pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
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 vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.vpc_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.vpc_id = input;
self
}
pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
&self.vpc_id
}
pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.subnet_ids.unwrap_or_default();
v.push(input.into());
self.subnet_ids = ::std::option::Option::Some(v);
self
}
pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.subnet_ids = input;
self
}
pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.subnet_ids
}
pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.security_group_ids.unwrap_or_default();
v.push(input.into());
self.security_group_ids = ::std::option::Option::Some(v);
self
}
pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.security_group_ids = input;
self
}
pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.security_group_ids
}
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 tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub fn active_links_count(mut self, input: i32) -> Self {
self.active_links_count = ::std::option::Option::Some(input);
self
}
pub fn set_active_links_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.active_links_count = input;
self
}
pub fn get_active_links_count(&self) -> &::std::option::Option<i32> {
&self.active_links_count
}
pub fn total_links_count(mut self, input: i32) -> Self {
self.total_links_count = ::std::option::Option::Some(input);
self
}
pub fn set_total_links_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.total_links_count = input;
self
}
pub fn get_total_links_count(&self) -> &::std::option::Option<i32> {
&self.total_links_count
}
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::get_requester_gateway::GetRequesterGatewayOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_requester_gateway::GetRequesterGatewayOutput {
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 GetRequesterGatewayOutput",
)
})?,
domain_name: self.domain_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"domain_name",
"domain_name was not specified but it is required when building GetRequesterGatewayOutput",
)
})?,
description: self.description,
created_at: self.created_at,
updated_at: self.updated_at,
vpc_id: self.vpc_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"vpc_id",
"vpc_id was not specified but it is required when building GetRequesterGatewayOutput",
)
})?,
subnet_ids: self.subnet_ids.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"subnet_ids",
"subnet_ids was not specified but it is required when building GetRequesterGatewayOutput",
)
})?,
security_group_ids: self.security_group_ids.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"security_group_ids",
"security_group_ids was not specified but it is required when building GetRequesterGatewayOutput",
)
})?,
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 GetRequesterGatewayOutput",
)
})?,
tags: self.tags,
active_links_count: self.active_links_count,
total_links_count: self.total_links_count,
_request_id: self._request_id,
})
}
}