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
// 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 PutLogEventsInput {
/// <p>The name of the log group.</p>
#[doc(hidden)]
pub log_group_name: std::option::Option<std::string::String>,
/// <p>The name of the log stream.</p>
#[doc(hidden)]
pub log_stream_name: std::option::Option<std::string::String>,
/// <p>The log events.</p>
#[doc(hidden)]
pub log_events: std::option::Option<std::vec::Vec<crate::types::InputLogEvent>>,
/// <p>The sequence token obtained from the response of the previous <code>PutLogEvents</code> call.</p> <important>
/// <p>The <code>sequenceToken</code> parameter is now ignored in <code>PutLogEvents</code> actions. <code>PutLogEvents</code> actions are now accepted and never return <code>InvalidSequenceTokenException</code> or <code>DataAlreadyAcceptedException</code> even if the sequence token is not valid.</p>
/// </important>
#[doc(hidden)]
pub sequence_token: std::option::Option<std::string::String>,
}
impl PutLogEventsInput {
/// <p>The name of the log group.</p>
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
/// <p>The name of the log stream.</p>
pub fn log_stream_name(&self) -> std::option::Option<&str> {
self.log_stream_name.as_deref()
}
/// <p>The log events.</p>
pub fn log_events(&self) -> std::option::Option<&[crate::types::InputLogEvent]> {
self.log_events.as_deref()
}
/// <p>The sequence token obtained from the response of the previous <code>PutLogEvents</code> call.</p> <important>
/// <p>The <code>sequenceToken</code> parameter is now ignored in <code>PutLogEvents</code> actions. <code>PutLogEvents</code> actions are now accepted and never return <code>InvalidSequenceTokenException</code> or <code>DataAlreadyAcceptedException</code> even if the sequence token is not valid.</p>
/// </important>
pub fn sequence_token(&self) -> std::option::Option<&str> {
self.sequence_token.as_deref()
}
}
impl PutLogEventsInput {
/// Creates a new builder-style object to manufacture [`PutLogEventsInput`](crate::operation::put_log_events::PutLogEventsInput).
pub fn builder() -> crate::operation::put_log_events::builders::PutLogEventsInputBuilder {
crate::operation::put_log_events::builders::PutLogEventsInputBuilder::default()
}
}
/// A builder for [`PutLogEventsInput`](crate::operation::put_log_events::PutLogEventsInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct PutLogEventsInputBuilder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) log_stream_name: std::option::Option<std::string::String>,
pub(crate) log_events: std::option::Option<std::vec::Vec<crate::types::InputLogEvent>>,
pub(crate) sequence_token: std::option::Option<std::string::String>,
}
impl PutLogEventsInputBuilder {
/// <p>The name of the log group.</p>
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
/// <p>The name of the log group.</p>
pub fn set_log_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.log_group_name = input;
self
}
/// <p>The name of the log stream.</p>
pub fn log_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_stream_name = Some(input.into());
self
}
/// <p>The name of the log stream.</p>
pub fn set_log_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.log_stream_name = input;
self
}
/// Appends an item to `log_events`.
///
/// To override the contents of this collection use [`set_log_events`](Self::set_log_events).
///
/// <p>The log events.</p>
pub fn log_events(mut self, input: crate::types::InputLogEvent) -> Self {
let mut v = self.log_events.unwrap_or_default();
v.push(input);
self.log_events = Some(v);
self
}
/// <p>The log events.</p>
pub fn set_log_events(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::InputLogEvent>>,
) -> Self {
self.log_events = input;
self
}
/// <p>The sequence token obtained from the response of the previous <code>PutLogEvents</code> call.</p> <important>
/// <p>The <code>sequenceToken</code> parameter is now ignored in <code>PutLogEvents</code> actions. <code>PutLogEvents</code> actions are now accepted and never return <code>InvalidSequenceTokenException</code> or <code>DataAlreadyAcceptedException</code> even if the sequence token is not valid.</p>
/// </important>
pub fn sequence_token(mut self, input: impl Into<std::string::String>) -> Self {
self.sequence_token = Some(input.into());
self
}
/// <p>The sequence token obtained from the response of the previous <code>PutLogEvents</code> call.</p> <important>
/// <p>The <code>sequenceToken</code> parameter is now ignored in <code>PutLogEvents</code> actions. <code>PutLogEvents</code> actions are now accepted and never return <code>InvalidSequenceTokenException</code> or <code>DataAlreadyAcceptedException</code> even if the sequence token is not valid.</p>
/// </important>
pub fn set_sequence_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.sequence_token = input;
self
}
/// Consumes the builder and constructs a [`PutLogEventsInput`](crate::operation::put_log_events::PutLogEventsInput).
pub fn build(
self,
) -> Result<
crate::operation::put_log_events::PutLogEventsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::put_log_events::PutLogEventsInput {
log_group_name: self.log_group_name,
log_stream_name: self.log_stream_name,
log_events: self.log_events,
sequence_token: self.sequence_token,
})
}
}