aws_sdk_cloudtrail/operation/update_channel/
_update_channel_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateChannelOutput {
6 pub channel_arn: ::std::option::Option<::std::string::String>,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub source: ::std::option::Option<::std::string::String>,
12 pub destinations: ::std::option::Option<::std::vec::Vec<crate::types::Destination>>,
14 _request_id: Option<String>,
15}
16impl UpdateChannelOutput {
17 pub fn channel_arn(&self) -> ::std::option::Option<&str> {
19 self.channel_arn.as_deref()
20 }
21 pub fn name(&self) -> ::std::option::Option<&str> {
23 self.name.as_deref()
24 }
25 pub fn source(&self) -> ::std::option::Option<&str> {
27 self.source.as_deref()
28 }
29 pub fn destinations(&self) -> &[crate::types::Destination] {
33 self.destinations.as_deref().unwrap_or_default()
34 }
35}
36impl ::aws_types::request_id::RequestId for UpdateChannelOutput {
37 fn request_id(&self) -> Option<&str> {
38 self._request_id.as_deref()
39 }
40}
41impl UpdateChannelOutput {
42 pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelOutputBuilder {
44 crate::operation::update_channel::builders::UpdateChannelOutputBuilder::default()
45 }
46}
47
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct UpdateChannelOutputBuilder {
52 pub(crate) channel_arn: ::std::option::Option<::std::string::String>,
53 pub(crate) name: ::std::option::Option<::std::string::String>,
54 pub(crate) source: ::std::option::Option<::std::string::String>,
55 pub(crate) destinations: ::std::option::Option<::std::vec::Vec<crate::types::Destination>>,
56 _request_id: Option<String>,
57}
58impl UpdateChannelOutputBuilder {
59 pub fn channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.channel_arn = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.channel_arn = input;
67 self
68 }
69 pub fn get_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
71 &self.channel_arn
72 }
73 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.name = ::std::option::Option::Some(input.into());
76 self
77 }
78 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.name = input;
81 self
82 }
83 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
85 &self.name
86 }
87 pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.source = ::std::option::Option::Some(input.into());
90 self
91 }
92 pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.source = input;
95 self
96 }
97 pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
99 &self.source
100 }
101 pub fn destinations(mut self, input: crate::types::Destination) -> Self {
107 let mut v = self.destinations.unwrap_or_default();
108 v.push(input);
109 self.destinations = ::std::option::Option::Some(v);
110 self
111 }
112 pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Destination>>) -> Self {
114 self.destinations = input;
115 self
116 }
117 pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Destination>> {
119 &self.destinations
120 }
121 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
122 self._request_id = Some(request_id.into());
123 self
124 }
125
126 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
127 self._request_id = request_id;
128 self
129 }
130 pub fn build(self) -> crate::operation::update_channel::UpdateChannelOutput {
132 crate::operation::update_channel::UpdateChannelOutput {
133 channel_arn: self.channel_arn,
134 name: self.name,
135 source: self.source,
136 destinations: self.destinations,
137 _request_id: self._request_id,
138 }
139 }
140}