#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListRealtimeContactAnalysisSegmentsV2Output {
pub channel: crate::types::RealTimeContactAnalysisSupportedChannel,
pub status: crate::types::RealTimeContactAnalysisStatus,
pub segments: ::std::vec::Vec<crate::types::RealtimeContactAnalysisSegment>,
pub next_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ListRealtimeContactAnalysisSegmentsV2Output {
pub fn channel(&self) -> &crate::types::RealTimeContactAnalysisSupportedChannel {
&self.channel
}
pub fn status(&self) -> &crate::types::RealTimeContactAnalysisStatus {
&self.status
}
pub fn segments(&self) -> &[crate::types::RealtimeContactAnalysisSegment] {
use std::ops::Deref;
self.segments.deref()
}
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl ::aws_types::request_id::RequestId for ListRealtimeContactAnalysisSegmentsV2Output {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ListRealtimeContactAnalysisSegmentsV2Output {
pub fn builder() -> crate::operation::list_realtime_contact_analysis_segments_v2::builders::ListRealtimeContactAnalysisSegmentsV2OutputBuilder {
crate::operation::list_realtime_contact_analysis_segments_v2::builders::ListRealtimeContactAnalysisSegmentsV2OutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ListRealtimeContactAnalysisSegmentsV2OutputBuilder {
pub(crate) channel: ::std::option::Option<crate::types::RealTimeContactAnalysisSupportedChannel>,
pub(crate) status: ::std::option::Option<crate::types::RealTimeContactAnalysisStatus>,
pub(crate) segments: ::std::option::Option<::std::vec::Vec<crate::types::RealtimeContactAnalysisSegment>>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ListRealtimeContactAnalysisSegmentsV2OutputBuilder {
pub fn channel(mut self, input: crate::types::RealTimeContactAnalysisSupportedChannel) -> Self {
self.channel = ::std::option::Option::Some(input);
self
}
pub fn set_channel(mut self, input: ::std::option::Option<crate::types::RealTimeContactAnalysisSupportedChannel>) -> Self {
self.channel = input;
self
}
pub fn get_channel(&self) -> &::std::option::Option<crate::types::RealTimeContactAnalysisSupportedChannel> {
&self.channel
}
pub fn status(mut self, input: crate::types::RealTimeContactAnalysisStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::RealTimeContactAnalysisStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::RealTimeContactAnalysisStatus> {
&self.status
}
pub fn segments(mut self, input: crate::types::RealtimeContactAnalysisSegment) -> Self {
let mut v = self.segments.unwrap_or_default();
v.push(input);
self.segments = ::std::option::Option::Some(v);
self
}
pub fn set_segments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RealtimeContactAnalysisSegment>>) -> Self {
self.segments = input;
self
}
pub fn get_segments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RealtimeContactAnalysisSegment>> {
&self.segments
}
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::list_realtime_contact_analysis_segments_v2::ListRealtimeContactAnalysisSegmentsV2Output,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(
crate::operation::list_realtime_contact_analysis_segments_v2::ListRealtimeContactAnalysisSegmentsV2Output {
channel: self.channel.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"channel",
"channel was not specified but it is required when building ListRealtimeContactAnalysisSegmentsV2Output",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building ListRealtimeContactAnalysisSegmentsV2Output",
)
})?,
segments: self.segments.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"segments",
"segments was not specified but it is required when building ListRealtimeContactAnalysisSegmentsV2Output",
)
})?,
next_token: self.next_token,
_request_id: self._request_id,
},
)
}
}