aws_sdk_mediapackage/operation/configure_logs/
_configure_logs_output.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 ConfigureLogsOutput {
6    /// The Amazon Resource Name (ARN) assigned to the Channel.
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// The date and time the Channel was created.
9    pub created_at: ::std::option::Option<::std::string::String>,
10    /// A short text description of the Channel.
11    pub description: ::std::option::Option<::std::string::String>,
12    /// Configure egress access logging.
13    pub egress_access_logs: ::std::option::Option<crate::types::EgressAccessLogs>,
14    /// An HTTP Live Streaming (HLS) ingest resource configuration.
15    pub hls_ingest: ::std::option::Option<crate::types::HlsIngest>,
16    /// The ID of the Channel.
17    pub id: ::std::option::Option<::std::string::String>,
18    /// Configure ingress access logging.
19    pub ingress_access_logs: ::std::option::Option<crate::types::IngressAccessLogs>,
20    /// A collection of tags associated with a resource
21    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22    _request_id: Option<String>,
23}
24impl ConfigureLogsOutput {
25    /// The Amazon Resource Name (ARN) assigned to the Channel.
26    pub fn arn(&self) -> ::std::option::Option<&str> {
27        self.arn.as_deref()
28    }
29    /// The date and time the Channel was created.
30    pub fn created_at(&self) -> ::std::option::Option<&str> {
31        self.created_at.as_deref()
32    }
33    /// A short text description of the Channel.
34    pub fn description(&self) -> ::std::option::Option<&str> {
35        self.description.as_deref()
36    }
37    /// Configure egress access logging.
38    pub fn egress_access_logs(&self) -> ::std::option::Option<&crate::types::EgressAccessLogs> {
39        self.egress_access_logs.as_ref()
40    }
41    /// An HTTP Live Streaming (HLS) ingest resource configuration.
42    pub fn hls_ingest(&self) -> ::std::option::Option<&crate::types::HlsIngest> {
43        self.hls_ingest.as_ref()
44    }
45    /// The ID of the Channel.
46    pub fn id(&self) -> ::std::option::Option<&str> {
47        self.id.as_deref()
48    }
49    /// Configure ingress access logging.
50    pub fn ingress_access_logs(&self) -> ::std::option::Option<&crate::types::IngressAccessLogs> {
51        self.ingress_access_logs.as_ref()
52    }
53    /// A collection of tags associated with a resource
54    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
55        self.tags.as_ref()
56    }
57}
58impl ::aws_types::request_id::RequestId for ConfigureLogsOutput {
59    fn request_id(&self) -> Option<&str> {
60        self._request_id.as_deref()
61    }
62}
63impl ConfigureLogsOutput {
64    /// Creates a new builder-style object to manufacture [`ConfigureLogsOutput`](crate::operation::configure_logs::ConfigureLogsOutput).
65    pub fn builder() -> crate::operation::configure_logs::builders::ConfigureLogsOutputBuilder {
66        crate::operation::configure_logs::builders::ConfigureLogsOutputBuilder::default()
67    }
68}
69
70/// A builder for [`ConfigureLogsOutput`](crate::operation::configure_logs::ConfigureLogsOutput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct ConfigureLogsOutputBuilder {
74    pub(crate) arn: ::std::option::Option<::std::string::String>,
75    pub(crate) created_at: ::std::option::Option<::std::string::String>,
76    pub(crate) description: ::std::option::Option<::std::string::String>,
77    pub(crate) egress_access_logs: ::std::option::Option<crate::types::EgressAccessLogs>,
78    pub(crate) hls_ingest: ::std::option::Option<crate::types::HlsIngest>,
79    pub(crate) id: ::std::option::Option<::std::string::String>,
80    pub(crate) ingress_access_logs: ::std::option::Option<crate::types::IngressAccessLogs>,
81    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
82    _request_id: Option<String>,
83}
84impl ConfigureLogsOutputBuilder {
85    /// The Amazon Resource Name (ARN) assigned to the Channel.
86    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.arn = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// The Amazon Resource Name (ARN) assigned to the Channel.
91    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.arn = input;
93        self
94    }
95    /// The Amazon Resource Name (ARN) assigned to the Channel.
96    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
97        &self.arn
98    }
99    /// The date and time the Channel was created.
100    pub fn created_at(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.created_at = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// The date and time the Channel was created.
105    pub fn set_created_at(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.created_at = input;
107        self
108    }
109    /// The date and time the Channel was created.
110    pub fn get_created_at(&self) -> &::std::option::Option<::std::string::String> {
111        &self.created_at
112    }
113    /// A short text description of the Channel.
114    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.description = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// A short text description of the Channel.
119    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.description = input;
121        self
122    }
123    /// A short text description of the Channel.
124    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
125        &self.description
126    }
127    /// Configure egress access logging.
128    pub fn egress_access_logs(mut self, input: crate::types::EgressAccessLogs) -> Self {
129        self.egress_access_logs = ::std::option::Option::Some(input);
130        self
131    }
132    /// Configure egress access logging.
133    pub fn set_egress_access_logs(mut self, input: ::std::option::Option<crate::types::EgressAccessLogs>) -> Self {
134        self.egress_access_logs = input;
135        self
136    }
137    /// Configure egress access logging.
138    pub fn get_egress_access_logs(&self) -> &::std::option::Option<crate::types::EgressAccessLogs> {
139        &self.egress_access_logs
140    }
141    /// An HTTP Live Streaming (HLS) ingest resource configuration.
142    pub fn hls_ingest(mut self, input: crate::types::HlsIngest) -> Self {
143        self.hls_ingest = ::std::option::Option::Some(input);
144        self
145    }
146    /// An HTTP Live Streaming (HLS) ingest resource configuration.
147    pub fn set_hls_ingest(mut self, input: ::std::option::Option<crate::types::HlsIngest>) -> Self {
148        self.hls_ingest = input;
149        self
150    }
151    /// An HTTP Live Streaming (HLS) ingest resource configuration.
152    pub fn get_hls_ingest(&self) -> &::std::option::Option<crate::types::HlsIngest> {
153        &self.hls_ingest
154    }
155    /// The ID of the Channel.
156    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.id = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// The ID of the Channel.
161    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.id = input;
163        self
164    }
165    /// The ID of the Channel.
166    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
167        &self.id
168    }
169    /// Configure ingress access logging.
170    pub fn ingress_access_logs(mut self, input: crate::types::IngressAccessLogs) -> Self {
171        self.ingress_access_logs = ::std::option::Option::Some(input);
172        self
173    }
174    /// Configure ingress access logging.
175    pub fn set_ingress_access_logs(mut self, input: ::std::option::Option<crate::types::IngressAccessLogs>) -> Self {
176        self.ingress_access_logs = input;
177        self
178    }
179    /// Configure ingress access logging.
180    pub fn get_ingress_access_logs(&self) -> &::std::option::Option<crate::types::IngressAccessLogs> {
181        &self.ingress_access_logs
182    }
183    /// Adds a key-value pair to `tags`.
184    ///
185    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
186    ///
187    /// A collection of tags associated with a resource
188    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
189        let mut hash_map = self.tags.unwrap_or_default();
190        hash_map.insert(k.into(), v.into());
191        self.tags = ::std::option::Option::Some(hash_map);
192        self
193    }
194    /// A collection of tags associated with a resource
195    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
196        self.tags = input;
197        self
198    }
199    /// A collection of tags associated with a resource
200    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
201        &self.tags
202    }
203    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
204        self._request_id = Some(request_id.into());
205        self
206    }
207
208    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
209        self._request_id = request_id;
210        self
211    }
212    /// Consumes the builder and constructs a [`ConfigureLogsOutput`](crate::operation::configure_logs::ConfigureLogsOutput).
213    pub fn build(self) -> crate::operation::configure_logs::ConfigureLogsOutput {
214        crate::operation::configure_logs::ConfigureLogsOutput {
215            arn: self.arn,
216            created_at: self.created_at,
217            description: self.description,
218            egress_access_logs: self.egress_access_logs,
219            hls_ingest: self.hls_ingest,
220            id: self.id,
221            ingress_access_logs: self.ingress_access_logs,
222            tags: self.tags,
223            _request_id: self._request_id,
224        }
225    }
226}