aws_sdk_mediapackage/operation/configure_logs/
_configure_logs_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ConfigureLogsInput {
7 pub egress_access_logs: ::std::option::Option<crate::types::EgressAccessLogs>,
9 pub id: ::std::option::Option<::std::string::String>,
11 pub ingress_access_logs: ::std::option::Option<crate::types::IngressAccessLogs>,
13}
14impl ConfigureLogsInput {
15 pub fn egress_access_logs(&self) -> ::std::option::Option<&crate::types::EgressAccessLogs> {
17 self.egress_access_logs.as_ref()
18 }
19 pub fn id(&self) -> ::std::option::Option<&str> {
21 self.id.as_deref()
22 }
23 pub fn ingress_access_logs(&self) -> ::std::option::Option<&crate::types::IngressAccessLogs> {
25 self.ingress_access_logs.as_ref()
26 }
27}
28impl ConfigureLogsInput {
29 pub fn builder() -> crate::operation::configure_logs::builders::ConfigureLogsInputBuilder {
31 crate::operation::configure_logs::builders::ConfigureLogsInputBuilder::default()
32 }
33}
34
35#[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 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 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 pub fn get_egress_access_logs(&self) -> &::std::option::Option<crate::types::EgressAccessLogs> {
56 &self.egress_access_logs
57 }
58 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.id = input;
67 self
68 }
69 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
71 &self.id
72 }
73 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 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 pub fn get_ingress_access_logs(&self) -> &::std::option::Option<crate::types::IngressAccessLogs> {
85 &self.ingress_access_logs
86 }
87 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}