aws_sdk_kafka/types/
_broker_logs.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 BrokerLogs {
6    #[allow(missing_docs)] // documentation missing in model
7    pub cloud_watch_logs: ::std::option::Option<crate::types::CloudWatchLogs>,
8    #[allow(missing_docs)] // documentation missing in model
9    pub firehose: ::std::option::Option<crate::types::Firehose>,
10    #[allow(missing_docs)] // documentation missing in model
11    pub s3: ::std::option::Option<crate::types::S3>,
12}
13impl BrokerLogs {
14    #[allow(missing_docs)] // documentation missing in model
15    pub fn cloud_watch_logs(&self) -> ::std::option::Option<&crate::types::CloudWatchLogs> {
16        self.cloud_watch_logs.as_ref()
17    }
18    #[allow(missing_docs)] // documentation missing in model
19    pub fn firehose(&self) -> ::std::option::Option<&crate::types::Firehose> {
20        self.firehose.as_ref()
21    }
22    #[allow(missing_docs)] // documentation missing in model
23    pub fn s3(&self) -> ::std::option::Option<&crate::types::S3> {
24        self.s3.as_ref()
25    }
26}
27impl BrokerLogs {
28    /// Creates a new builder-style object to manufacture [`BrokerLogs`](crate::types::BrokerLogs).
29    pub fn builder() -> crate::types::builders::BrokerLogsBuilder {
30        crate::types::builders::BrokerLogsBuilder::default()
31    }
32}
33
34/// A builder for [`BrokerLogs`](crate::types::BrokerLogs).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct BrokerLogsBuilder {
38    pub(crate) cloud_watch_logs: ::std::option::Option<crate::types::CloudWatchLogs>,
39    pub(crate) firehose: ::std::option::Option<crate::types::Firehose>,
40    pub(crate) s3: ::std::option::Option<crate::types::S3>,
41}
42impl BrokerLogsBuilder {
43    #[allow(missing_docs)] // documentation missing in model
44    pub fn cloud_watch_logs(mut self, input: crate::types::CloudWatchLogs) -> Self {
45        self.cloud_watch_logs = ::std::option::Option::Some(input);
46        self
47    }
48    #[allow(missing_docs)] // documentation missing in model
49    pub fn set_cloud_watch_logs(mut self, input: ::std::option::Option<crate::types::CloudWatchLogs>) -> Self {
50        self.cloud_watch_logs = input;
51        self
52    }
53    #[allow(missing_docs)] // documentation missing in model
54    pub fn get_cloud_watch_logs(&self) -> &::std::option::Option<crate::types::CloudWatchLogs> {
55        &self.cloud_watch_logs
56    }
57    #[allow(missing_docs)] // documentation missing in model
58    pub fn firehose(mut self, input: crate::types::Firehose) -> Self {
59        self.firehose = ::std::option::Option::Some(input);
60        self
61    }
62    #[allow(missing_docs)] // documentation missing in model
63    pub fn set_firehose(mut self, input: ::std::option::Option<crate::types::Firehose>) -> Self {
64        self.firehose = input;
65        self
66    }
67    #[allow(missing_docs)] // documentation missing in model
68    pub fn get_firehose(&self) -> &::std::option::Option<crate::types::Firehose> {
69        &self.firehose
70    }
71    #[allow(missing_docs)] // documentation missing in model
72    pub fn s3(mut self, input: crate::types::S3) -> Self {
73        self.s3 = ::std::option::Option::Some(input);
74        self
75    }
76    #[allow(missing_docs)] // documentation missing in model
77    pub fn set_s3(mut self, input: ::std::option::Option<crate::types::S3>) -> Self {
78        self.s3 = input;
79        self
80    }
81    #[allow(missing_docs)] // documentation missing in model
82    pub fn get_s3(&self) -> &::std::option::Option<crate::types::S3> {
83        &self.s3
84    }
85    /// Consumes the builder and constructs a [`BrokerLogs`](crate::types::BrokerLogs).
86    pub fn build(self) -> crate::types::BrokerLogs {
87        crate::types::BrokerLogs {
88            cloud_watch_logs: self.cloud_watch_logs,
89            firehose: self.firehose,
90            s3: self.s3,
91        }
92    }
93}