aws_sdk_ivs/operation/batch_start_viewer_session_revocation/
_batch_start_viewer_session_revocation_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct BatchStartViewerSessionRevocationOutput {
6 pub errors: ::std::option::Option<::std::vec::Vec<crate::types::BatchStartViewerSessionRevocationError>>,
8 _request_id: Option<String>,
9}
10impl BatchStartViewerSessionRevocationOutput {
11 pub fn errors(&self) -> &[crate::types::BatchStartViewerSessionRevocationError] {
15 self.errors.as_deref().unwrap_or_default()
16 }
17}
18impl ::aws_types::request_id::RequestId for BatchStartViewerSessionRevocationOutput {
19 fn request_id(&self) -> Option<&str> {
20 self._request_id.as_deref()
21 }
22}
23impl BatchStartViewerSessionRevocationOutput {
24 pub fn builder() -> crate::operation::batch_start_viewer_session_revocation::builders::BatchStartViewerSessionRevocationOutputBuilder {
26 crate::operation::batch_start_viewer_session_revocation::builders::BatchStartViewerSessionRevocationOutputBuilder::default()
27 }
28}
29
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct BatchStartViewerSessionRevocationOutputBuilder {
34 pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::BatchStartViewerSessionRevocationError>>,
35 _request_id: Option<String>,
36}
37impl BatchStartViewerSessionRevocationOutputBuilder {
38 pub fn errors(mut self, input: crate::types::BatchStartViewerSessionRevocationError) -> Self {
44 let mut v = self.errors.unwrap_or_default();
45 v.push(input);
46 self.errors = ::std::option::Option::Some(v);
47 self
48 }
49 pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchStartViewerSessionRevocationError>>) -> Self {
51 self.errors = input;
52 self
53 }
54 pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchStartViewerSessionRevocationError>> {
56 &self.errors
57 }
58 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
59 self._request_id = Some(request_id.into());
60 self
61 }
62
63 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
64 self._request_id = request_id;
65 self
66 }
67 pub fn build(self) -> crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationOutput {
69 crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationOutput {
70 errors: self.errors,
71 _request_id: self._request_id,
72 }
73 }
74}