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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DisableLoggingInput {
/// <p>The identifier of the cluster on which logging is to be stopped.</p>
/// <p>Example: <code>examplecluster</code></p>
pub cluster_identifier: ::std::option::Option<::std::string::String>,
/// <p>The log destination type. An enum with possible values of <code>s3</code>, <code>cloudwatch</code>, and <code>s3table</code>. When set to <code>s3table</code>, stops system table publishing. When omitted, the operation disables audit logging.</p>
pub log_destination_type: ::std::option::Option<crate::types::LogDestinationType>,
/// <p>The collection of log types to stop exporting. When <code>LogDestinationType</code> is <code>s3table</code>, the values are the names of the system tables to stop publishing. Omitting this parameter or passing <code>all</code> stops publishing all system tables.</p>
pub log_exports: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisableLoggingInput {
/// <p>The identifier of the cluster on which logging is to be stopped.</p>
/// <p>Example: <code>examplecluster</code></p>
pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
self.cluster_identifier.as_deref()
}
/// <p>The log destination type. An enum with possible values of <code>s3</code>, <code>cloudwatch</code>, and <code>s3table</code>. When set to <code>s3table</code>, stops system table publishing. When omitted, the operation disables audit logging.</p>
pub fn log_destination_type(&self) -> ::std::option::Option<&crate::types::LogDestinationType> {
self.log_destination_type.as_ref()
}
/// <p>The collection of log types to stop exporting. When <code>LogDestinationType</code> is <code>s3table</code>, the values are the names of the system tables to stop publishing. Omitting this parameter or passing <code>all</code> stops publishing all system tables.</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 `.log_exports.is_none()`.
pub fn log_exports(&self) -> &[::std::string::String] {
self.log_exports.as_deref().unwrap_or_default()
}
}
impl DisableLoggingInput {
/// Creates a new builder-style object to manufacture [`DisableLoggingInput`](crate::operation::disable_logging::DisableLoggingInput).
pub fn builder() -> crate::operation::disable_logging::builders::DisableLoggingInputBuilder {
crate::operation::disable_logging::builders::DisableLoggingInputBuilder::default()
}
}
/// A builder for [`DisableLoggingInput`](crate::operation::disable_logging::DisableLoggingInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisableLoggingInputBuilder {
pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
pub(crate) log_destination_type: ::std::option::Option<crate::types::LogDestinationType>,
pub(crate) log_exports: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisableLoggingInputBuilder {
/// <p>The identifier of the cluster on which logging is to be stopped.</p>
/// <p>Example: <code>examplecluster</code></p>
/// This field is required.
pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the cluster on which logging is to be stopped.</p>
/// <p>Example: <code>examplecluster</code></p>
pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_identifier = input;
self
}
/// <p>The identifier of the cluster on which logging is to be stopped.</p>
/// <p>Example: <code>examplecluster</code></p>
pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_identifier
}
/// <p>The log destination type. An enum with possible values of <code>s3</code>, <code>cloudwatch</code>, and <code>s3table</code>. When set to <code>s3table</code>, stops system table publishing. When omitted, the operation disables audit logging.</p>
pub fn log_destination_type(mut self, input: crate::types::LogDestinationType) -> Self {
self.log_destination_type = ::std::option::Option::Some(input);
self
}
/// <p>The log destination type. An enum with possible values of <code>s3</code>, <code>cloudwatch</code>, and <code>s3table</code>. When set to <code>s3table</code>, stops system table publishing. When omitted, the operation disables audit logging.</p>
pub fn set_log_destination_type(mut self, input: ::std::option::Option<crate::types::LogDestinationType>) -> Self {
self.log_destination_type = input;
self
}
/// <p>The log destination type. An enum with possible values of <code>s3</code>, <code>cloudwatch</code>, and <code>s3table</code>. When set to <code>s3table</code>, stops system table publishing. When omitted, the operation disables audit logging.</p>
pub fn get_log_destination_type(&self) -> &::std::option::Option<crate::types::LogDestinationType> {
&self.log_destination_type
}
/// Appends an item to `log_exports`.
///
/// To override the contents of this collection use [`set_log_exports`](Self::set_log_exports).
///
/// <p>The collection of log types to stop exporting. When <code>LogDestinationType</code> is <code>s3table</code>, the values are the names of the system tables to stop publishing. Omitting this parameter or passing <code>all</code> stops publishing all system tables.</p>
pub fn log_exports(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.log_exports.unwrap_or_default();
v.push(input.into());
self.log_exports = ::std::option::Option::Some(v);
self
}
/// <p>The collection of log types to stop exporting. When <code>LogDestinationType</code> is <code>s3table</code>, the values are the names of the system tables to stop publishing. Omitting this parameter or passing <code>all</code> stops publishing all system tables.</p>
pub fn set_log_exports(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.log_exports = input;
self
}
/// <p>The collection of log types to stop exporting. When <code>LogDestinationType</code> is <code>s3table</code>, the values are the names of the system tables to stop publishing. Omitting this parameter or passing <code>all</code> stops publishing all system tables.</p>
pub fn get_log_exports(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.log_exports
}
/// Consumes the builder and constructs a [`DisableLoggingInput`](crate::operation::disable_logging::DisableLoggingInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::disable_logging::DisableLoggingInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::disable_logging::DisableLoggingInput {
cluster_identifier: self.cluster_identifier,
log_destination_type: self.log_destination_type,
log_exports: self.log_exports,
})
}
}