aws_sdk_mediapackage/operation/configure_logs/
_configure_logs_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// the option to configure log subscription.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ConfigureLogsInput {
7    /// Configure egress access logging.
8    pub egress_access_logs: ::std::option::Option<crate::types::EgressAccessLogs>,
9    /// The ID of the channel to log subscription.
10    pub id: ::std::option::Option<::std::string::String>,
11    /// Configure ingress access logging.
12    pub ingress_access_logs: ::std::option::Option<crate::types::IngressAccessLogs>,
13}
14impl ConfigureLogsInput {
15    /// Configure egress access logging.
16    pub fn egress_access_logs(&self) -> ::std::option::Option<&crate::types::EgressAccessLogs> {
17        self.egress_access_logs.as_ref()
18    }
19    /// The ID of the channel to log subscription.
20    pub fn id(&self) -> ::std::option::Option<&str> {
21        self.id.as_deref()
22    }
23    /// Configure ingress access logging.
24    pub fn ingress_access_logs(&self) -> ::std::option::Option<&crate::types::IngressAccessLogs> {
25        self.ingress_access_logs.as_ref()
26    }
27}
28impl ConfigureLogsInput {
29    /// Creates a new builder-style object to manufacture [`ConfigureLogsInput`](crate::operation::configure_logs::ConfigureLogsInput).
30    pub fn builder() -> crate::operation::configure_logs::builders::ConfigureLogsInputBuilder {
31        crate::operation::configure_logs::builders::ConfigureLogsInputBuilder::default()
32    }
33}
34
35/// A builder for [`ConfigureLogsInput`](crate::operation::configure_logs::ConfigureLogsInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct ConfigureLogsInputBuilder {
39    pub(crate) egress_access_logs: ::std::option::Option<crate::types::EgressAccessLogs>,
40    pub(crate) id: ::std::option::Option<::std::string::String>,
41    pub(crate) ingress_access_logs: ::std::option::Option<crate::types::IngressAccessLogs>,
42}
43impl ConfigureLogsInputBuilder {
44    /// Configure egress access logging.
45    pub fn egress_access_logs(mut self, input: crate::types::EgressAccessLogs) -> Self {
46        self.egress_access_logs = ::std::option::Option::Some(input);
47        self
48    }
49    /// Configure egress access logging.
50    pub fn set_egress_access_logs(mut self, input: ::std::option::Option<crate::types::EgressAccessLogs>) -> Self {
51        self.egress_access_logs = input;
52        self
53    }
54    /// Configure egress access logging.
55    pub fn get_egress_access_logs(&self) -> &::std::option::Option<crate::types::EgressAccessLogs> {
56        &self.egress_access_logs
57    }
58    /// The ID of the channel to log subscription.
59    /// This field is required.
60    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// The ID of the channel to log subscription.
65    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.id = input;
67        self
68    }
69    /// The ID of the channel to log subscription.
70    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.id
72    }
73    /// Configure ingress access logging.
74    pub fn ingress_access_logs(mut self, input: crate::types::IngressAccessLogs) -> Self {
75        self.ingress_access_logs = ::std::option::Option::Some(input);
76        self
77    }
78    /// Configure ingress access logging.
79    pub fn set_ingress_access_logs(mut self, input: ::std::option::Option<crate::types::IngressAccessLogs>) -> Self {
80        self.ingress_access_logs = input;
81        self
82    }
83    /// Configure ingress access logging.
84    pub fn get_ingress_access_logs(&self) -> &::std::option::Option<crate::types::IngressAccessLogs> {
85        &self.ingress_access_logs
86    }
87    /// Consumes the builder and constructs a [`ConfigureLogsInput`](crate::operation::configure_logs::ConfigureLogsInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::configure_logs::ConfigureLogsInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::configure_logs::ConfigureLogsInput {
92            egress_access_logs: self.egress_access_logs,
93            id: self.id,
94            ingress_access_logs: self.ingress_access_logs,
95        })
96    }
97}