aws_sdk_pinpointemail/operation/get_dedicated_ip/
_get_dedicated_ip_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about a dedicated IP address.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetDedicatedIpOutput {
7    /// <p>An object that contains information about a dedicated IP address.</p>
8    pub dedicated_ip: ::std::option::Option<crate::types::DedicatedIp>,
9    _request_id: Option<String>,
10}
11impl GetDedicatedIpOutput {
12    /// <p>An object that contains information about a dedicated IP address.</p>
13    pub fn dedicated_ip(&self) -> ::std::option::Option<&crate::types::DedicatedIp> {
14        self.dedicated_ip.as_ref()
15    }
16}
17impl ::aws_types::request_id::RequestId for GetDedicatedIpOutput {
18    fn request_id(&self) -> Option<&str> {
19        self._request_id.as_deref()
20    }
21}
22impl GetDedicatedIpOutput {
23    /// Creates a new builder-style object to manufacture [`GetDedicatedIpOutput`](crate::operation::get_dedicated_ip::GetDedicatedIpOutput).
24    pub fn builder() -> crate::operation::get_dedicated_ip::builders::GetDedicatedIpOutputBuilder {
25        crate::operation::get_dedicated_ip::builders::GetDedicatedIpOutputBuilder::default()
26    }
27}
28
29/// A builder for [`GetDedicatedIpOutput`](crate::operation::get_dedicated_ip::GetDedicatedIpOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct GetDedicatedIpOutputBuilder {
33    pub(crate) dedicated_ip: ::std::option::Option<crate::types::DedicatedIp>,
34    _request_id: Option<String>,
35}
36impl GetDedicatedIpOutputBuilder {
37    /// <p>An object that contains information about a dedicated IP address.</p>
38    pub fn dedicated_ip(mut self, input: crate::types::DedicatedIp) -> Self {
39        self.dedicated_ip = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>An object that contains information about a dedicated IP address.</p>
43    pub fn set_dedicated_ip(mut self, input: ::std::option::Option<crate::types::DedicatedIp>) -> Self {
44        self.dedicated_ip = input;
45        self
46    }
47    /// <p>An object that contains information about a dedicated IP address.</p>
48    pub fn get_dedicated_ip(&self) -> &::std::option::Option<crate::types::DedicatedIp> {
49        &self.dedicated_ip
50    }
51    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52        self._request_id = Some(request_id.into());
53        self
54    }
55
56    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57        self._request_id = request_id;
58        self
59    }
60    /// Consumes the builder and constructs a [`GetDedicatedIpOutput`](crate::operation::get_dedicated_ip::GetDedicatedIpOutput).
61    pub fn build(self) -> crate::operation::get_dedicated_ip::GetDedicatedIpOutput {
62        crate::operation::get_dedicated_ip::GetDedicatedIpOutput {
63            dedicated_ip: self.dedicated_ip,
64            _request_id: self._request_id,
65        }
66    }
67}