aws_sdk_eventbridge/operation/describe_event_bus/_describe_event_bus_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeEventBusOutput {
6 /// <p>The name of the event bus. Currently, this is always <code>default</code>.</p>
7 pub name: ::std::option::Option<::std::string::String>,
8 /// <p>The Amazon Resource Name (ARN) of the account permitted to write events to the current account.</p>
9 pub arn: ::std::option::Option<::std::string::String>,
10 /// <p>The event bus description.</p>
11 pub description: ::std::option::Option<::std::string::String>,
12 /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.</p>
13 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html">Data encryption in EventBridge</a> in the <i>Amazon EventBridge User Guide</i>.</p>
14 pub kms_key_identifier: ::std::option::Option<::std::string::String>,
15 /// <p>Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).</p>
16 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq">Using dead-letter queues to process undelivered events</a> in the <i>EventBridge User Guide</i>.</p>
17 pub dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
18 /// <p>The policy that enables the external account to send events to your account.</p>
19 pub policy: ::std::option::Option<::std::string::String>,
20 /// <p>The logging configuration settings for the event bus.</p>
21 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eb-event-bus-logs.html">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>
22 pub log_config: ::std::option::Option<crate::types::LogConfig>,
23 /// <p>The time the event bus was created.</p>
24 pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
25 /// <p>The time the event bus was last modified.</p>
26 pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
27 _request_id: Option<String>,
28}
29impl DescribeEventBusOutput {
30 /// <p>The name of the event bus. Currently, this is always <code>default</code>.</p>
31 pub fn name(&self) -> ::std::option::Option<&str> {
32 self.name.as_deref()
33 }
34 /// <p>The Amazon Resource Name (ARN) of the account permitted to write events to the current account.</p>
35 pub fn arn(&self) -> ::std::option::Option<&str> {
36 self.arn.as_deref()
37 }
38 /// <p>The event bus description.</p>
39 pub fn description(&self) -> ::std::option::Option<&str> {
40 self.description.as_deref()
41 }
42 /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.</p>
43 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html">Data encryption in EventBridge</a> in the <i>Amazon EventBridge User Guide</i>.</p>
44 pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
45 self.kms_key_identifier.as_deref()
46 }
47 /// <p>Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).</p>
48 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq">Using dead-letter queues to process undelivered events</a> in the <i>EventBridge User Guide</i>.</p>
49 pub fn dead_letter_config(&self) -> ::std::option::Option<&crate::types::DeadLetterConfig> {
50 self.dead_letter_config.as_ref()
51 }
52 /// <p>The policy that enables the external account to send events to your account.</p>
53 pub fn policy(&self) -> ::std::option::Option<&str> {
54 self.policy.as_deref()
55 }
56 /// <p>The logging configuration settings for the event bus.</p>
57 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eb-event-bus-logs.html">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>
58 pub fn log_config(&self) -> ::std::option::Option<&crate::types::LogConfig> {
59 self.log_config.as_ref()
60 }
61 /// <p>The time the event bus was created.</p>
62 pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
63 self.creation_time.as_ref()
64 }
65 /// <p>The time the event bus was last modified.</p>
66 pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
67 self.last_modified_time.as_ref()
68 }
69}
70impl ::aws_types::request_id::RequestId for DescribeEventBusOutput {
71 fn request_id(&self) -> Option<&str> {
72 self._request_id.as_deref()
73 }
74}
75impl DescribeEventBusOutput {
76 /// Creates a new builder-style object to manufacture [`DescribeEventBusOutput`](crate::operation::describe_event_bus::DescribeEventBusOutput).
77 pub fn builder() -> crate::operation::describe_event_bus::builders::DescribeEventBusOutputBuilder {
78 crate::operation::describe_event_bus::builders::DescribeEventBusOutputBuilder::default()
79 }
80}
81
82/// A builder for [`DescribeEventBusOutput`](crate::operation::describe_event_bus::DescribeEventBusOutput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct DescribeEventBusOutputBuilder {
86 pub(crate) name: ::std::option::Option<::std::string::String>,
87 pub(crate) arn: ::std::option::Option<::std::string::String>,
88 pub(crate) description: ::std::option::Option<::std::string::String>,
89 pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
90 pub(crate) dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
91 pub(crate) policy: ::std::option::Option<::std::string::String>,
92 pub(crate) log_config: ::std::option::Option<crate::types::LogConfig>,
93 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
94 pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
95 _request_id: Option<String>,
96}
97impl DescribeEventBusOutputBuilder {
98 /// <p>The name of the event bus. Currently, this is always <code>default</code>.</p>
99 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.name = ::std::option::Option::Some(input.into());
101 self
102 }
103 /// <p>The name of the event bus. Currently, this is always <code>default</code>.</p>
104 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.name = input;
106 self
107 }
108 /// <p>The name of the event bus. Currently, this is always <code>default</code>.</p>
109 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
110 &self.name
111 }
112 /// <p>The Amazon Resource Name (ARN) of the account permitted to write events to the current account.</p>
113 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.arn = ::std::option::Option::Some(input.into());
115 self
116 }
117 /// <p>The Amazon Resource Name (ARN) of the account permitted to write events to the current account.</p>
118 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.arn = input;
120 self
121 }
122 /// <p>The Amazon Resource Name (ARN) of the account permitted to write events to the current account.</p>
123 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
124 &self.arn
125 }
126 /// <p>The event bus description.</p>
127 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.description = ::std::option::Option::Some(input.into());
129 self
130 }
131 /// <p>The event bus description.</p>
132 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.description = input;
134 self
135 }
136 /// <p>The event bus description.</p>
137 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
138 &self.description
139 }
140 /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.</p>
141 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html">Data encryption in EventBridge</a> in the <i>Amazon EventBridge User Guide</i>.</p>
142 pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.kms_key_identifier = ::std::option::Option::Some(input.into());
144 self
145 }
146 /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.</p>
147 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html">Data encryption in EventBridge</a> in the <i>Amazon EventBridge User Guide</i>.</p>
148 pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.kms_key_identifier = input;
150 self
151 }
152 /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.</p>
153 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html">Data encryption in EventBridge</a> in the <i>Amazon EventBridge User Guide</i>.</p>
154 pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
155 &self.kms_key_identifier
156 }
157 /// <p>Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).</p>
158 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq">Using dead-letter queues to process undelivered events</a> in the <i>EventBridge User Guide</i>.</p>
159 pub fn dead_letter_config(mut self, input: crate::types::DeadLetterConfig) -> Self {
160 self.dead_letter_config = ::std::option::Option::Some(input);
161 self
162 }
163 /// <p>Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).</p>
164 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq">Using dead-letter queues to process undelivered events</a> in the <i>EventBridge User Guide</i>.</p>
165 pub fn set_dead_letter_config(mut self, input: ::std::option::Option<crate::types::DeadLetterConfig>) -> Self {
166 self.dead_letter_config = input;
167 self
168 }
169 /// <p>Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).</p>
170 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq">Using dead-letter queues to process undelivered events</a> in the <i>EventBridge User Guide</i>.</p>
171 pub fn get_dead_letter_config(&self) -> &::std::option::Option<crate::types::DeadLetterConfig> {
172 &self.dead_letter_config
173 }
174 /// <p>The policy that enables the external account to send events to your account.</p>
175 pub fn policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.policy = ::std::option::Option::Some(input.into());
177 self
178 }
179 /// <p>The policy that enables the external account to send events to your account.</p>
180 pub fn set_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181 self.policy = input;
182 self
183 }
184 /// <p>The policy that enables the external account to send events to your account.</p>
185 pub fn get_policy(&self) -> &::std::option::Option<::std::string::String> {
186 &self.policy
187 }
188 /// <p>The logging configuration settings for the event bus.</p>
189 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eb-event-bus-logs.html">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>
190 pub fn log_config(mut self, input: crate::types::LogConfig) -> Self {
191 self.log_config = ::std::option::Option::Some(input);
192 self
193 }
194 /// <p>The logging configuration settings for the event bus.</p>
195 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eb-event-bus-logs.html">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>
196 pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::LogConfig>) -> Self {
197 self.log_config = input;
198 self
199 }
200 /// <p>The logging configuration settings for the event bus.</p>
201 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eb-event-bus-logs.html">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>
202 pub fn get_log_config(&self) -> &::std::option::Option<crate::types::LogConfig> {
203 &self.log_config
204 }
205 /// <p>The time the event bus was created.</p>
206 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
207 self.creation_time = ::std::option::Option::Some(input);
208 self
209 }
210 /// <p>The time the event bus was created.</p>
211 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
212 self.creation_time = input;
213 self
214 }
215 /// <p>The time the event bus was created.</p>
216 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
217 &self.creation_time
218 }
219 /// <p>The time the event bus was last modified.</p>
220 pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
221 self.last_modified_time = ::std::option::Option::Some(input);
222 self
223 }
224 /// <p>The time the event bus was last modified.</p>
225 pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
226 self.last_modified_time = input;
227 self
228 }
229 /// <p>The time the event bus was last modified.</p>
230 pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
231 &self.last_modified_time
232 }
233 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
234 self._request_id = Some(request_id.into());
235 self
236 }
237
238 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
239 self._request_id = request_id;
240 self
241 }
242 /// Consumes the builder and constructs a [`DescribeEventBusOutput`](crate::operation::describe_event_bus::DescribeEventBusOutput).
243 pub fn build(self) -> crate::operation::describe_event_bus::DescribeEventBusOutput {
244 crate::operation::describe_event_bus::DescribeEventBusOutput {
245 name: self.name,
246 arn: self.arn,
247 description: self.description,
248 kms_key_identifier: self.kms_key_identifier,
249 dead_letter_config: self.dead_letter_config,
250 policy: self.policy,
251 log_config: self.log_config,
252 creation_time: self.creation_time,
253 last_modified_time: self.last_modified_time,
254 _request_id: self._request_id,
255 }
256 }
257}