aws-sdk-outposts 1.106.0

AWS SDK for AWS Outposts
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 GetSiteAddressOutput {
    /// <p>The ID of the site.</p>
    pub site_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of the address you receive.</p>
    pub address_type: ::std::option::Option<crate::types::AddressType>,
    /// <p>Information about the address.</p>
    pub address: ::std::option::Option<crate::types::Address>,
    _request_id: Option<String>,
}
impl GetSiteAddressOutput {
    /// <p>The ID of the site.</p>
    pub fn site_id(&self) -> ::std::option::Option<&str> {
        self.site_id.as_deref()
    }
    /// <p>The type of the address you receive.</p>
    pub fn address_type(&self) -> ::std::option::Option<&crate::types::AddressType> {
        self.address_type.as_ref()
    }
    /// <p>Information about the address.</p>
    pub fn address(&self) -> ::std::option::Option<&crate::types::Address> {
        self.address.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetSiteAddressOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetSiteAddressOutput {
    /// Creates a new builder-style object to manufacture [`GetSiteAddressOutput`](crate::operation::get_site_address::GetSiteAddressOutput).
    pub fn builder() -> crate::operation::get_site_address::builders::GetSiteAddressOutputBuilder {
        crate::operation::get_site_address::builders::GetSiteAddressOutputBuilder::default()
    }
}

/// A builder for [`GetSiteAddressOutput`](crate::operation::get_site_address::GetSiteAddressOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSiteAddressOutputBuilder {
    pub(crate) site_id: ::std::option::Option<::std::string::String>,
    pub(crate) address_type: ::std::option::Option<crate::types::AddressType>,
    pub(crate) address: ::std::option::Option<crate::types::Address>,
    _request_id: Option<String>,
}
impl GetSiteAddressOutputBuilder {
    /// <p>The ID of the site.</p>
    pub fn site_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.site_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the site.</p>
    pub fn set_site_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.site_id = input;
        self
    }
    /// <p>The ID of the site.</p>
    pub fn get_site_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.site_id
    }
    /// <p>The type of the address you receive.</p>
    pub fn address_type(mut self, input: crate::types::AddressType) -> Self {
        self.address_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the address you receive.</p>
    pub fn set_address_type(mut self, input: ::std::option::Option<crate::types::AddressType>) -> Self {
        self.address_type = input;
        self
    }
    /// <p>The type of the address you receive.</p>
    pub fn get_address_type(&self) -> &::std::option::Option<crate::types::AddressType> {
        &self.address_type
    }
    /// <p>Information about the address.</p>
    pub fn address(mut self, input: crate::types::Address) -> Self {
        self.address = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the address.</p>
    pub fn set_address(mut self, input: ::std::option::Option<crate::types::Address>) -> Self {
        self.address = input;
        self
    }
    /// <p>Information about the address.</p>
    pub fn get_address(&self) -> &::std::option::Option<crate::types::Address> {
        &self.address
    }
    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 [`GetSiteAddressOutput`](crate::operation::get_site_address::GetSiteAddressOutput).
    pub fn build(self) -> crate::operation::get_site_address::GetSiteAddressOutput {
        crate::operation::get_site_address::GetSiteAddressOutput {
            site_id: self.site_id,
            address_type: self.address_type,
            address: self.address,
            _request_id: self._request_id,
        }
    }
}