aws_sdk_cloudfront/operation/list_connection_groups/
_list_connection_groups_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ListConnectionGroupsOutput {
6 pub next_marker: ::std::option::Option<::std::string::String>,
8 pub connection_groups: ::std::option::Option<::std::vec::Vec<crate::types::ConnectionGroupSummary>>,
10 _request_id: Option<String>,
11}
12impl ListConnectionGroupsOutput {
13 pub fn next_marker(&self) -> ::std::option::Option<&str> {
15 self.next_marker.as_deref()
16 }
17 pub fn connection_groups(&self) -> &[crate::types::ConnectionGroupSummary] {
21 self.connection_groups.as_deref().unwrap_or_default()
22 }
23}
24impl ::aws_types::request_id::RequestId for ListConnectionGroupsOutput {
25 fn request_id(&self) -> Option<&str> {
26 self._request_id.as_deref()
27 }
28}
29impl ListConnectionGroupsOutput {
30 pub fn builder() -> crate::operation::list_connection_groups::builders::ListConnectionGroupsOutputBuilder {
32 crate::operation::list_connection_groups::builders::ListConnectionGroupsOutputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct ListConnectionGroupsOutputBuilder {
40 pub(crate) next_marker: ::std::option::Option<::std::string::String>,
41 pub(crate) connection_groups: ::std::option::Option<::std::vec::Vec<crate::types::ConnectionGroupSummary>>,
42 _request_id: Option<String>,
43}
44impl ListConnectionGroupsOutputBuilder {
45 pub fn next_marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.next_marker = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_next_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.next_marker = input;
53 self
54 }
55 pub fn get_next_marker(&self) -> &::std::option::Option<::std::string::String> {
57 &self.next_marker
58 }
59 pub fn connection_groups(mut self, input: crate::types::ConnectionGroupSummary) -> Self {
65 let mut v = self.connection_groups.unwrap_or_default();
66 v.push(input);
67 self.connection_groups = ::std::option::Option::Some(v);
68 self
69 }
70 pub fn set_connection_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConnectionGroupSummary>>) -> Self {
72 self.connection_groups = input;
73 self
74 }
75 pub fn get_connection_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConnectionGroupSummary>> {
77 &self.connection_groups
78 }
79 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
80 self._request_id = Some(request_id.into());
81 self
82 }
83
84 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
85 self._request_id = request_id;
86 self
87 }
88 pub fn build(self) -> crate::operation::list_connection_groups::ListConnectionGroupsOutput {
90 crate::operation::list_connection_groups::ListConnectionGroupsOutput {
91 next_marker: self.next_marker,
92 connection_groups: self.connection_groups,
93 _request_id: self._request_id,
94 }
95 }
96}