aws-sdk-rtbfabric 1.22.0

AWS SDK for RTBFabric
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRequesterGatewayOutput {
    /// <p>The status of the request.</p>
    pub status: crate::types::RequesterGatewayStatus,
    /// <p>The domain name of the requester gateway.</p>
    pub domain_name: ::std::string::String,
    /// <p>The description of the requester gateway.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp of when the requester gateway was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp of when the requester gateway was updated.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The unique identifier of the Virtual Private Cloud (VPC).</p>
    pub vpc_id: ::std::string::String,
    /// <p>The unique identifiers of the subnets.</p>
    pub subnet_ids: ::std::vec::Vec<::std::string::String>,
    /// <p>The unique identifiers of the security groups.</p>
    pub security_group_ids: ::std::vec::Vec<::std::string::String>,
    /// <p>The unique identifier of the gateway.</p>
    pub gateway_id: ::std::string::String,
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The count of active links for the requester gateway.</p>
    pub active_links_count: ::std::option::Option<i32>,
    /// <p>The total count of links for the requester gateway.</p>
    pub total_links_count: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl GetRequesterGatewayOutput {
    /// <p>The status of the request.</p>
    pub fn status(&self) -> &crate::types::RequesterGatewayStatus {
        &self.status
    }
    /// <p>The domain name of the requester gateway.</p>
    pub fn domain_name(&self) -> &str {
        use std::ops::Deref;
        self.domain_name.deref()
    }
    /// <p>The description of the requester gateway.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The timestamp of when the requester gateway was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The timestamp of when the requester gateway was updated.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The unique identifier of the Virtual Private Cloud (VPC).</p>
    pub fn vpc_id(&self) -> &str {
        use std::ops::Deref;
        self.vpc_id.deref()
    }
    /// <p>The unique identifiers of the subnets.</p>
    pub fn subnet_ids(&self) -> &[::std::string::String] {
        use std::ops::Deref;
        self.subnet_ids.deref()
    }
    /// <p>The unique identifiers of the security groups.</p>
    pub fn security_group_ids(&self) -> &[::std::string::String] {
        use std::ops::Deref;
        self.security_group_ids.deref()
    }
    /// <p>The unique identifier of the gateway.</p>
    pub fn gateway_id(&self) -> &str {
        use std::ops::Deref;
        self.gateway_id.deref()
    }
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The count of active links for the requester gateway.</p>
    pub fn active_links_count(&self) -> ::std::option::Option<i32> {
        self.active_links_count
    }
    /// <p>The total count of links for the requester gateway.</p>
    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 {
    /// Creates a new builder-style object to manufacture [`GetRequesterGatewayOutput`](crate::operation::get_requester_gateway::GetRequesterGatewayOutput).
    pub fn builder() -> crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder {
        crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder::default()
    }
}

/// A builder for [`GetRequesterGatewayOutput`](crate::operation::get_requester_gateway::GetRequesterGatewayOutput).
#[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 {
    /// <p>The status of the request.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::RequesterGatewayStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the request.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::RequesterGatewayStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the request.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::RequesterGatewayStatus> {
        &self.status
    }
    /// <p>The domain name of the requester gateway.</p>
    /// This field is required.
    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
    }
    /// <p>The domain name of the requester gateway.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The domain name of the requester gateway.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The description of the requester gateway.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the requester gateway.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the requester gateway.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The timestamp of when the requester gateway was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the requester gateway was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The timestamp of when the requester gateway was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The timestamp of when the requester gateway was updated.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the requester gateway was updated.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The timestamp of when the requester gateway was updated.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// <p>The unique identifier of the Virtual Private Cloud (VPC).</p>
    /// This field is required.
    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
    }
    /// <p>The unique identifier of the Virtual Private Cloud (VPC).</p>
    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_id = input;
        self
    }
    /// <p>The unique identifier of the Virtual Private Cloud (VPC).</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// Appends an item to `subnet_ids`.
    ///
    /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
    ///
    /// <p>The unique identifiers of the subnets.</p>
    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
    }
    /// <p>The unique identifiers of the subnets.</p>
    pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.subnet_ids = input;
        self
    }
    /// <p>The unique identifiers of the subnets.</p>
    pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.subnet_ids
    }
    /// Appends an item to `security_group_ids`.
    ///
    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
    ///
    /// <p>The unique identifiers of the security groups.</p>
    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
    }
    /// <p>The unique identifiers of the security groups.</p>
    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
    }
    /// <p>The unique identifiers of the security groups.</p>
    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.security_group_ids
    }
    /// <p>The unique identifier of the gateway.</p>
    /// This field is required.
    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
    }
    /// <p>The unique identifier of the gateway.</p>
    pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.gateway_id = input;
        self
    }
    /// <p>The unique identifier of the gateway.</p>
    pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.gateway_id
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    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
    }
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>The count of active links for the requester gateway.</p>
    pub fn active_links_count(mut self, input: i32) -> Self {
        self.active_links_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The count of active links for the requester gateway.</p>
    pub fn set_active_links_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.active_links_count = input;
        self
    }
    /// <p>The count of active links for the requester gateway.</p>
    pub fn get_active_links_count(&self) -> &::std::option::Option<i32> {
        &self.active_links_count
    }
    /// <p>The total count of links for the requester gateway.</p>
    pub fn total_links_count(mut self, input: i32) -> Self {
        self.total_links_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The total count of links for the requester gateway.</p>
    pub fn set_total_links_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.total_links_count = input;
        self
    }
    /// <p>The total count of links for the requester gateway.</p>
    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
    }
    /// Consumes the builder and constructs a [`GetRequesterGatewayOutput`](crate::operation::get_requester_gateway::GetRequesterGatewayOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`status`](crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder::status)
    /// - [`domain_name`](crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder::domain_name)
    /// - [`vpc_id`](crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder::vpc_id)
    /// - [`subnet_ids`](crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder::subnet_ids)
    /// - [`security_group_ids`](crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder::security_group_ids)
    /// - [`gateway_id`](crate::operation::get_requester_gateway::builders::GetRequesterGatewayOutputBuilder::gateway_id)
    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,
        })
    }
}