rustack_events_model/output.rs
1//! EventBridge output types for Phase 0 through Phase 3 operations.
2//!
3//! All output structs use `PascalCase` JSON field naming to match the EventBridge
4//! wire protocol (`awsJson1_1`). Optional fields are omitted when `None`.
5
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9use crate::types::{
10 DeadLetterConfig, EventBus, PutEventsResultEntry, PutTargetsResultEntry,
11 RemoveTargetsResultEntry, Rule, Tag, Target,
12};
13
14// ===========================================================================
15// Phase 0
16// ===========================================================================
17
18// ---------------------------------------------------------------------------
19// CreateEventBus
20// ---------------------------------------------------------------------------
21
22/// Output for the `CreateEventBus` operation.
23#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24#[serde(rename_all = "PascalCase")]
25pub struct CreateEventBusOutput {
26 /// The ARN of the new event bus.
27 #[serde(skip_serializing_if = "Option::is_none")]
28 pub event_bus_arn: Option<String>,
29
30 /// The description of the event bus.
31 #[serde(skip_serializing_if = "Option::is_none")]
32 pub description: Option<String>,
33
34 /// The dead-letter queue configuration.
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub dead_letter_config: Option<DeadLetterConfig>,
37
38 /// The KMS key identifier for encryption.
39 #[serde(skip_serializing_if = "Option::is_none")]
40 pub kms_key_identifier: Option<String>,
41}
42
43// ---------------------------------------------------------------------------
44// DeleteEventBus
45// ---------------------------------------------------------------------------
46
47/// Output for the `DeleteEventBus` operation (empty).
48#[derive(Debug, Clone, Default, Serialize, Deserialize)]
49#[serde(rename_all = "PascalCase")]
50pub struct DeleteEventBusOutput {}
51
52// ---------------------------------------------------------------------------
53// DescribeEventBus
54// ---------------------------------------------------------------------------
55
56/// Output for the `DescribeEventBus` operation.
57#[derive(Debug, Clone, Default, Serialize, Deserialize)]
58#[serde(rename_all = "PascalCase")]
59pub struct DescribeEventBusOutput {
60 /// The name of the event bus.
61 #[serde(skip_serializing_if = "Option::is_none")]
62 pub name: Option<String>,
63
64 /// The ARN of the event bus.
65 #[serde(skip_serializing_if = "Option::is_none")]
66 pub arn: Option<String>,
67
68 /// The description of the event bus.
69 #[serde(skip_serializing_if = "Option::is_none")]
70 pub description: Option<String>,
71
72 /// The policy for the event bus.
73 #[serde(skip_serializing_if = "Option::is_none")]
74 pub policy: Option<String>,
75
76 /// The dead-letter queue configuration.
77 #[serde(skip_serializing_if = "Option::is_none")]
78 pub dead_letter_config: Option<DeadLetterConfig>,
79
80 /// The KMS key identifier for encryption.
81 #[serde(skip_serializing_if = "Option::is_none")]
82 pub kms_key_identifier: Option<String>,
83}
84
85// ---------------------------------------------------------------------------
86// ListEventBuses
87// ---------------------------------------------------------------------------
88
89/// Output for the `ListEventBuses` operation.
90#[derive(Debug, Clone, Default, Serialize, Deserialize)]
91#[serde(rename_all = "PascalCase")]
92pub struct ListEventBusesOutput {
93 /// The event buses.
94 #[serde(default)]
95 pub event_buses: Vec<EventBus>,
96
97 /// The token for the next page of results, if any.
98 #[serde(skip_serializing_if = "Option::is_none")]
99 pub next_token: Option<String>,
100}
101
102// ---------------------------------------------------------------------------
103// PutRule
104// ---------------------------------------------------------------------------
105
106/// Output for the `PutRule` operation.
107#[derive(Debug, Clone, Default, Serialize, Deserialize)]
108#[serde(rename_all = "PascalCase")]
109pub struct PutRuleOutput {
110 /// The ARN of the rule.
111 #[serde(skip_serializing_if = "Option::is_none")]
112 pub rule_arn: Option<String>,
113}
114
115// ---------------------------------------------------------------------------
116// DeleteRule
117// ---------------------------------------------------------------------------
118
119/// Output for the `DeleteRule` operation (empty).
120#[derive(Debug, Clone, Default, Serialize, Deserialize)]
121#[serde(rename_all = "PascalCase")]
122pub struct DeleteRuleOutput {}
123
124// ---------------------------------------------------------------------------
125// DescribeRule
126// ---------------------------------------------------------------------------
127
128/// Output for the `DescribeRule` operation.
129#[derive(Debug, Clone, Default, Serialize, Deserialize)]
130#[serde(rename_all = "PascalCase")]
131pub struct DescribeRuleOutput {
132 /// The name of the rule.
133 #[serde(skip_serializing_if = "Option::is_none")]
134 pub name: Option<String>,
135
136 /// The ARN of the rule.
137 #[serde(skip_serializing_if = "Option::is_none")]
138 pub arn: Option<String>,
139
140 /// The event pattern for the rule.
141 #[serde(skip_serializing_if = "Option::is_none")]
142 pub event_pattern: Option<String>,
143
144 /// The schedule expression for the rule.
145 #[serde(skip_serializing_if = "Option::is_none")]
146 pub schedule_expression: Option<String>,
147
148 /// The state of the rule (`ENABLED` or `DISABLED`).
149 #[serde(skip_serializing_if = "Option::is_none")]
150 pub state: Option<String>,
151
152 /// The description of the rule.
153 #[serde(skip_serializing_if = "Option::is_none")]
154 pub description: Option<String>,
155
156 /// The IAM role ARN associated with the rule.
157 #[serde(skip_serializing_if = "Option::is_none")]
158 pub role_arn: Option<String>,
159
160 /// The AWS service that manages the rule.
161 #[serde(skip_serializing_if = "Option::is_none")]
162 pub managed_by: Option<String>,
163
164 /// The name of the event bus associated with the rule.
165 #[serde(skip_serializing_if = "Option::is_none")]
166 pub event_bus_name: Option<String>,
167
168 /// The account ID of the creator of the rule.
169 #[serde(skip_serializing_if = "Option::is_none")]
170 pub created_by: Option<String>,
171}
172
173// ---------------------------------------------------------------------------
174// ListRules
175// ---------------------------------------------------------------------------
176
177/// Output for the `ListRules` operation.
178#[derive(Debug, Clone, Default, Serialize, Deserialize)]
179#[serde(rename_all = "PascalCase")]
180pub struct ListRulesOutput {
181 /// The rules that match the request.
182 #[serde(default)]
183 pub rules: Vec<Rule>,
184
185 /// The token for the next page of results, if any.
186 #[serde(skip_serializing_if = "Option::is_none")]
187 pub next_token: Option<String>,
188}
189
190// ---------------------------------------------------------------------------
191// EnableRule
192// ---------------------------------------------------------------------------
193
194/// Output for the `EnableRule` operation (empty).
195#[derive(Debug, Clone, Default, Serialize, Deserialize)]
196#[serde(rename_all = "PascalCase")]
197pub struct EnableRuleOutput {}
198
199// ---------------------------------------------------------------------------
200// DisableRule
201// ---------------------------------------------------------------------------
202
203/// Output for the `DisableRule` operation (empty).
204#[derive(Debug, Clone, Default, Serialize, Deserialize)]
205#[serde(rename_all = "PascalCase")]
206pub struct DisableRuleOutput {}
207
208// ---------------------------------------------------------------------------
209// PutTargets
210// ---------------------------------------------------------------------------
211
212/// Output for the `PutTargets` operation.
213#[derive(Debug, Clone, Default, Serialize, Deserialize)]
214#[serde(rename_all = "PascalCase")]
215pub struct PutTargetsOutput {
216 /// The number of failed entries.
217 pub failed_entry_count: i32,
218
219 /// The failed entries.
220 #[serde(default)]
221 pub failed_entries: Vec<PutTargetsResultEntry>,
222}
223
224// ---------------------------------------------------------------------------
225// RemoveTargets
226// ---------------------------------------------------------------------------
227
228/// Output for the `RemoveTargets` operation.
229#[derive(Debug, Clone, Default, Serialize, Deserialize)]
230#[serde(rename_all = "PascalCase")]
231pub struct RemoveTargetsOutput {
232 /// The number of failed entries.
233 pub failed_entry_count: i32,
234
235 /// The failed entries.
236 #[serde(default)]
237 pub failed_entries: Vec<RemoveTargetsResultEntry>,
238}
239
240// ---------------------------------------------------------------------------
241// ListTargetsByRule
242// ---------------------------------------------------------------------------
243
244/// Output for the `ListTargetsByRule` operation.
245#[derive(Debug, Clone, Default, Serialize, Deserialize)]
246#[serde(rename_all = "PascalCase")]
247pub struct ListTargetsByRuleOutput {
248 /// The targets assigned to the rule.
249 #[serde(default)]
250 pub targets: Vec<Target>,
251
252 /// The token for the next page of results, if any.
253 #[serde(skip_serializing_if = "Option::is_none")]
254 pub next_token: Option<String>,
255}
256
257// ---------------------------------------------------------------------------
258// PutEvents
259// ---------------------------------------------------------------------------
260
261/// Output for the `PutEvents` operation.
262#[derive(Debug, Clone, Default, Serialize, Deserialize)]
263#[serde(rename_all = "PascalCase")]
264pub struct PutEventsOutput {
265 /// The number of failed entries.
266 pub failed_entry_count: i32,
267
268 /// The result entries.
269 #[serde(default)]
270 pub entries: Vec<PutEventsResultEntry>,
271}
272
273// ---------------------------------------------------------------------------
274// TestEventPattern
275// ---------------------------------------------------------------------------
276
277/// Output for the `TestEventPattern` operation.
278#[derive(Debug, Clone, Default, Serialize, Deserialize)]
279#[serde(rename_all = "PascalCase")]
280pub struct TestEventPatternOutput {
281 /// Whether the event matches the pattern.
282 pub result: bool,
283}
284
285// ===========================================================================
286// Phase 1
287// ===========================================================================
288
289// ---------------------------------------------------------------------------
290// TagResource
291// ---------------------------------------------------------------------------
292
293/// Output for the `TagResource` operation (empty).
294#[derive(Debug, Clone, Default, Serialize, Deserialize)]
295#[serde(rename_all = "PascalCase")]
296pub struct TagResourceOutput {}
297
298// ---------------------------------------------------------------------------
299// UntagResource
300// ---------------------------------------------------------------------------
301
302/// Output for the `UntagResource` operation (empty).
303#[derive(Debug, Clone, Default, Serialize, Deserialize)]
304#[serde(rename_all = "PascalCase")]
305pub struct UntagResourceOutput {}
306
307// ---------------------------------------------------------------------------
308// ListTagsForResource
309// ---------------------------------------------------------------------------
310
311/// Output for the `ListTagsForResource` operation.
312#[derive(Debug, Clone, Default, Serialize, Deserialize)]
313#[serde(rename_all = "PascalCase")]
314pub struct ListTagsForResourceOutput {
315 /// The tags associated with the resource.
316 #[serde(default)]
317 pub tags: Vec<Tag>,
318}
319
320// ---------------------------------------------------------------------------
321// PutPermission
322// ---------------------------------------------------------------------------
323
324/// Output for the `PutPermission` operation (empty).
325#[derive(Debug, Clone, Default, Serialize, Deserialize)]
326#[serde(rename_all = "PascalCase")]
327pub struct PutPermissionOutput {}
328
329// ---------------------------------------------------------------------------
330// RemovePermission
331// ---------------------------------------------------------------------------
332
333/// Output for the `RemovePermission` operation (empty).
334#[derive(Debug, Clone, Default, Serialize, Deserialize)]
335#[serde(rename_all = "PascalCase")]
336pub struct RemovePermissionOutput {}
337
338// ---------------------------------------------------------------------------
339// ListRuleNamesByTarget
340// ---------------------------------------------------------------------------
341
342/// Output for the `ListRuleNamesByTarget` operation.
343#[derive(Debug, Clone, Default, Serialize, Deserialize)]
344#[serde(rename_all = "PascalCase")]
345pub struct ListRuleNamesByTargetOutput {
346 /// The names of the rules that reference the specified target.
347 #[serde(default)]
348 pub rule_names: Vec<String>,
349
350 /// The token for the next page of results, if any.
351 #[serde(skip_serializing_if = "Option::is_none")]
352 pub next_token: Option<String>,
353}
354
355// ===========================================================================
356// Phase 2
357// ===========================================================================
358
359// ---------------------------------------------------------------------------
360// UpdateEventBus
361// ---------------------------------------------------------------------------
362
363/// Output for the `UpdateEventBus` operation.
364#[derive(Debug, Clone, Default, Serialize, Deserialize)]
365#[serde(rename_all = "PascalCase")]
366pub struct UpdateEventBusOutput {
367 /// The ARN of the updated event bus.
368 #[serde(skip_serializing_if = "Option::is_none")]
369 pub arn: Option<String>,
370
371 /// The name of the updated event bus.
372 #[serde(skip_serializing_if = "Option::is_none")]
373 pub name: Option<String>,
374
375 /// The description of the updated event bus.
376 #[serde(skip_serializing_if = "Option::is_none")]
377 pub description: Option<String>,
378
379 /// The dead-letter queue configuration.
380 #[serde(skip_serializing_if = "Option::is_none")]
381 pub dead_letter_config: Option<DeadLetterConfig>,
382
383 /// The KMS key identifier for encryption.
384 #[serde(skip_serializing_if = "Option::is_none")]
385 pub kms_key_identifier: Option<String>,
386}
387
388// ===========================================================================
389// Phase 3 (stubs)
390// ===========================================================================
391
392/// Generic output wrapper for stub operations that return raw JSON.
393#[derive(Debug, Clone, Default, Serialize, Deserialize)]
394#[serde(transparent)]
395pub struct GenericOutput {
396 /// The raw JSON value.
397 pub value: Value,
398}