aws_sdk_globalaccelerator/operation/list_custom_routing_port_mappings_by_destination/
_list_custom_routing_port_mappings_by_destination_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ListCustomRoutingPortMappingsByDestinationOutput {
6    pub destination_port_mappings: ::std::option::Option<::std::vec::Vec<crate::types::DestinationPortMapping>>,
8    pub next_token: ::std::option::Option<::std::string::String>,
10    _request_id: Option<String>,
11}
12impl ListCustomRoutingPortMappingsByDestinationOutput {
13    pub fn destination_port_mappings(&self) -> &[crate::types::DestinationPortMapping] {
17        self.destination_port_mappings.as_deref().unwrap_or_default()
18    }
19    pub fn next_token(&self) -> ::std::option::Option<&str> {
21        self.next_token.as_deref()
22    }
23}
24impl ::aws_types::request_id::RequestId for ListCustomRoutingPortMappingsByDestinationOutput {
25    fn request_id(&self) -> Option<&str> {
26        self._request_id.as_deref()
27    }
28}
29impl ListCustomRoutingPortMappingsByDestinationOutput {
30    pub fn builder(
32    ) -> crate::operation::list_custom_routing_port_mappings_by_destination::builders::ListCustomRoutingPortMappingsByDestinationOutputBuilder {
33        crate::operation::list_custom_routing_port_mappings_by_destination::builders::ListCustomRoutingPortMappingsByDestinationOutputBuilder::default(
34        )
35    }
36}
37
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct ListCustomRoutingPortMappingsByDestinationOutputBuilder {
42    pub(crate) destination_port_mappings: ::std::option::Option<::std::vec::Vec<crate::types::DestinationPortMapping>>,
43    pub(crate) next_token: ::std::option::Option<::std::string::String>,
44    _request_id: Option<String>,
45}
46impl ListCustomRoutingPortMappingsByDestinationOutputBuilder {
47    pub fn destination_port_mappings(mut self, input: crate::types::DestinationPortMapping) -> Self {
53        let mut v = self.destination_port_mappings.unwrap_or_default();
54        v.push(input);
55        self.destination_port_mappings = ::std::option::Option::Some(v);
56        self
57    }
58    pub fn set_destination_port_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DestinationPortMapping>>) -> Self {
60        self.destination_port_mappings = input;
61        self
62    }
63    pub fn get_destination_port_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DestinationPortMapping>> {
65        &self.destination_port_mappings
66    }
67    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.next_token = ::std::option::Option::Some(input.into());
70        self
71    }
72    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.next_token = input;
75        self
76    }
77    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
79        &self.next_token
80    }
81    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
82        self._request_id = Some(request_id.into());
83        self
84    }
85
86    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
87        self._request_id = request_id;
88        self
89    }
90    pub fn build(self) -> crate::operation::list_custom_routing_port_mappings_by_destination::ListCustomRoutingPortMappingsByDestinationOutput {
92        crate::operation::list_custom_routing_port_mappings_by_destination::ListCustomRoutingPortMappingsByDestinationOutput {
93            destination_port_mappings: self.destination_port_mappings,
94            next_token: self.next_token,
95            _request_id: self._request_id,
96        }
97    }
98}