1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
// 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 GetChannelOutput {
/// <p>The ARN of an channel returned by a <code>GetChannel</code> request.</p>
pub channel_arn: ::std::option::Option<::std::string::String>,
/// <p>The name of the CloudTrail channel. For service-linked channels, the name is <code>aws-service-channel/service-name/custom-suffix</code> where <code>service-name</code> represents the name of the Amazon Web Services service that created the channel and <code>custom-suffix</code> represents the suffix generated by the Amazon Web Services service.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The source for the CloudTrail channel.</p>
pub source: ::std::option::Option<::std::string::String>,
/// <p>Provides information about the advanced event selectors configured for the channel, and whether the channel applies to all Regions or a single Region.</p>
pub source_config: ::std::option::Option<crate::types::SourceConfig>,
/// <p>The destinations for the channel. For channels created for integrations, the destinations are the event data stores that log events arriving through the channel. For service-linked channels, the destination is the Amazon Web Services service that created the service-linked channel to receive events.</p>
pub destinations: ::std::option::Option<::std::vec::Vec<crate::types::Destination>>,
/// <p>A table showing information about the most recent successful and failed attempts to ingest events.</p>
pub ingestion_status: ::std::option::Option<crate::types::IngestionStatus>,
_request_id: Option<String>,
}
impl GetChannelOutput {
/// <p>The ARN of an channel returned by a <code>GetChannel</code> request.</p>
pub fn channel_arn(&self) -> ::std::option::Option<&str> {
self.channel_arn.as_deref()
}
/// <p>The name of the CloudTrail channel. For service-linked channels, the name is <code>aws-service-channel/service-name/custom-suffix</code> where <code>service-name</code> represents the name of the Amazon Web Services service that created the channel and <code>custom-suffix</code> represents the suffix generated by the Amazon Web Services service.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The source for the CloudTrail channel.</p>
pub fn source(&self) -> ::std::option::Option<&str> {
self.source.as_deref()
}
/// <p>Provides information about the advanced event selectors configured for the channel, and whether the channel applies to all Regions or a single Region.</p>
pub fn source_config(&self) -> ::std::option::Option<&crate::types::SourceConfig> {
self.source_config.as_ref()
}
/// <p>The destinations for the channel. For channels created for integrations, the destinations are the event data stores that log events arriving through the channel. For service-linked channels, the destination is the Amazon Web Services service that created the service-linked channel to receive events.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.destinations.is_none()`.
pub fn destinations(&self) -> &[crate::types::Destination] {
self.destinations.as_deref().unwrap_or_default()
}
/// <p>A table showing information about the most recent successful and failed attempts to ingest events.</p>
pub fn ingestion_status(&self) -> ::std::option::Option<&crate::types::IngestionStatus> {
self.ingestion_status.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetChannelOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetChannelOutput {
/// Creates a new builder-style object to manufacture [`GetChannelOutput`](crate::operation::get_channel::GetChannelOutput).
pub fn builder() -> crate::operation::get_channel::builders::GetChannelOutputBuilder {
crate::operation::get_channel::builders::GetChannelOutputBuilder::default()
}
}
/// A builder for [`GetChannelOutput`](crate::operation::get_channel::GetChannelOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetChannelOutputBuilder {
pub(crate) channel_arn: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) source: ::std::option::Option<::std::string::String>,
pub(crate) source_config: ::std::option::Option<crate::types::SourceConfig>,
pub(crate) destinations: ::std::option::Option<::std::vec::Vec<crate::types::Destination>>,
pub(crate) ingestion_status: ::std::option::Option<crate::types::IngestionStatus>,
_request_id: Option<String>,
}
impl GetChannelOutputBuilder {
/// <p>The ARN of an channel returned by a <code>GetChannel</code> request.</p>
pub fn channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.channel_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of an channel returned by a <code>GetChannel</code> request.</p>
pub fn set_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.channel_arn = input;
self
}
/// <p>The ARN of an channel returned by a <code>GetChannel</code> request.</p>
pub fn get_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.channel_arn
}
/// <p>The name of the CloudTrail channel. For service-linked channels, the name is <code>aws-service-channel/service-name/custom-suffix</code> where <code>service-name</code> represents the name of the Amazon Web Services service that created the channel and <code>custom-suffix</code> represents the suffix generated by the Amazon Web Services service.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the CloudTrail channel. For service-linked channels, the name is <code>aws-service-channel/service-name/custom-suffix</code> where <code>service-name</code> represents the name of the Amazon Web Services service that created the channel and <code>custom-suffix</code> represents the suffix generated by the Amazon Web Services service.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the CloudTrail channel. For service-linked channels, the name is <code>aws-service-channel/service-name/custom-suffix</code> where <code>service-name</code> represents the name of the Amazon Web Services service that created the channel and <code>custom-suffix</code> represents the suffix generated by the Amazon Web Services service.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The source for the CloudTrail channel.</p>
pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source = ::std::option::Option::Some(input.into());
self
}
/// <p>The source for the CloudTrail channel.</p>
pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source = input;
self
}
/// <p>The source for the CloudTrail channel.</p>
pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
&self.source
}
/// <p>Provides information about the advanced event selectors configured for the channel, and whether the channel applies to all Regions or a single Region.</p>
pub fn source_config(mut self, input: crate::types::SourceConfig) -> Self {
self.source_config = ::std::option::Option::Some(input);
self
}
/// <p>Provides information about the advanced event selectors configured for the channel, and whether the channel applies to all Regions or a single Region.</p>
pub fn set_source_config(mut self, input: ::std::option::Option<crate::types::SourceConfig>) -> Self {
self.source_config = input;
self
}
/// <p>Provides information about the advanced event selectors configured for the channel, and whether the channel applies to all Regions or a single Region.</p>
pub fn get_source_config(&self) -> &::std::option::Option<crate::types::SourceConfig> {
&self.source_config
}
/// Appends an item to `destinations`.
///
/// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
///
/// <p>The destinations for the channel. For channels created for integrations, the destinations are the event data stores that log events arriving through the channel. For service-linked channels, the destination is the Amazon Web Services service that created the service-linked channel to receive events.</p>
pub fn destinations(mut self, input: crate::types::Destination) -> Self {
let mut v = self.destinations.unwrap_or_default();
v.push(input);
self.destinations = ::std::option::Option::Some(v);
self
}
/// <p>The destinations for the channel. For channels created for integrations, the destinations are the event data stores that log events arriving through the channel. For service-linked channels, the destination is the Amazon Web Services service that created the service-linked channel to receive events.</p>
pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Destination>>) -> Self {
self.destinations = input;
self
}
/// <p>The destinations for the channel. For channels created for integrations, the destinations are the event data stores that log events arriving through the channel. For service-linked channels, the destination is the Amazon Web Services service that created the service-linked channel to receive events.</p>
pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Destination>> {
&self.destinations
}
/// <p>A table showing information about the most recent successful and failed attempts to ingest events.</p>
pub fn ingestion_status(mut self, input: crate::types::IngestionStatus) -> Self {
self.ingestion_status = ::std::option::Option::Some(input);
self
}
/// <p>A table showing information about the most recent successful and failed attempts to ingest events.</p>
pub fn set_ingestion_status(mut self, input: ::std::option::Option<crate::types::IngestionStatus>) -> Self {
self.ingestion_status = input;
self
}
/// <p>A table showing information about the most recent successful and failed attempts to ingest events.</p>
pub fn get_ingestion_status(&self) -> &::std::option::Option<crate::types::IngestionStatus> {
&self.ingestion_status
}
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 [`GetChannelOutput`](crate::operation::get_channel::GetChannelOutput).
pub fn build(self) -> crate::operation::get_channel::GetChannelOutput {
crate::operation::get_channel::GetChannelOutput {
channel_arn: self.channel_arn,
name: self.name,
source: self.source,
source_config: self.source_config,
destinations: self.destinations,
ingestion_status: self.ingestion_status,
_request_id: self._request_id,
}
}
}