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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Information about a logger
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Logger {
/// The component that will be subject to logging.
pub component: ::std::option::Option<crate::types::LoggerComponent>,
/// A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''.
pub id: ::std::option::Option<::std::string::String>,
/// The level of the logs.
pub level: ::std::option::Option<crate::types::LoggerLevel>,
/// The amount of file space, in KB, to use if the local file system is used for logging purposes.
pub space: ::std::option::Option<i32>,
/// The type of log output which will be used.
pub r#type: ::std::option::Option<crate::types::LoggerType>,
}
impl Logger {
/// The component that will be subject to logging.
pub fn component(&self) -> ::std::option::Option<&crate::types::LoggerComponent> {
self.component.as_ref()
}
/// A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''.
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
/// The level of the logs.
pub fn level(&self) -> ::std::option::Option<&crate::types::LoggerLevel> {
self.level.as_ref()
}
/// The amount of file space, in KB, to use if the local file system is used for logging purposes.
pub fn space(&self) -> ::std::option::Option<i32> {
self.space
}
/// The type of log output which will be used.
pub fn r#type(&self) -> ::std::option::Option<&crate::types::LoggerType> {
self.r#type.as_ref()
}
}
impl Logger {
/// Creates a new builder-style object to manufacture [`Logger`](crate::types::Logger).
pub fn builder() -> crate::types::builders::LoggerBuilder {
crate::types::builders::LoggerBuilder::default()
}
}
/// A builder for [`Logger`](crate::types::Logger).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct LoggerBuilder {
pub(crate) component: ::std::option::Option<crate::types::LoggerComponent>,
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) level: ::std::option::Option<crate::types::LoggerLevel>,
pub(crate) space: ::std::option::Option<i32>,
pub(crate) r#type: ::std::option::Option<crate::types::LoggerType>,
}
impl LoggerBuilder {
/// The component that will be subject to logging.
/// This field is required.
pub fn component(mut self, input: crate::types::LoggerComponent) -> Self {
self.component = ::std::option::Option::Some(input);
self
}
/// The component that will be subject to logging.
pub fn set_component(mut self, input: ::std::option::Option<crate::types::LoggerComponent>) -> Self {
self.component = input;
self
}
/// The component that will be subject to logging.
pub fn get_component(&self) -> &::std::option::Option<crate::types::LoggerComponent> {
&self.component
}
/// A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''.
/// This field is required.
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
/// A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''.
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
/// A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''.
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
/// The level of the logs.
/// This field is required.
pub fn level(mut self, input: crate::types::LoggerLevel) -> Self {
self.level = ::std::option::Option::Some(input);
self
}
/// The level of the logs.
pub fn set_level(mut self, input: ::std::option::Option<crate::types::LoggerLevel>) -> Self {
self.level = input;
self
}
/// The level of the logs.
pub fn get_level(&self) -> &::std::option::Option<crate::types::LoggerLevel> {
&self.level
}
/// The amount of file space, in KB, to use if the local file system is used for logging purposes.
pub fn space(mut self, input: i32) -> Self {
self.space = ::std::option::Option::Some(input);
self
}
/// The amount of file space, in KB, to use if the local file system is used for logging purposes.
pub fn set_space(mut self, input: ::std::option::Option<i32>) -> Self {
self.space = input;
self
}
/// The amount of file space, in KB, to use if the local file system is used for logging purposes.
pub fn get_space(&self) -> &::std::option::Option<i32> {
&self.space
}
/// The type of log output which will be used.
/// This field is required.
pub fn r#type(mut self, input: crate::types::LoggerType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// The type of log output which will be used.
pub fn set_type(mut self, input: ::std::option::Option<crate::types::LoggerType>) -> Self {
self.r#type = input;
self
}
/// The type of log output which will be used.
pub fn get_type(&self) -> &::std::option::Option<crate::types::LoggerType> {
&self.r#type
}
/// Consumes the builder and constructs a [`Logger`](crate::types::Logger).
pub fn build(self) -> crate::types::Logger {
crate::types::Logger {
component: self.component,
id: self.id,
level: self.level,
space: self.space,
r#type: self.r#type,
}
}
}