aws_sdk_voiceid/operation/evaluate_session/_evaluate_session_output.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EvaluateSessionOutput {
/// <p>The identifier of the domain that contains the session.</p>
pub domain_id: ::std::option::Option<::std::string::String>,
/// <p>The service-generated identifier of the session.</p>
pub session_id: ::std::option::Option<::std::string::String>,
/// <p>The client-provided name of the session.</p>
pub session_name: ::std::option::Option<::std::string::String>,
/// <p>The current status of audio streaming for this session. This field is useful to infer next steps when the Authentication or Fraud Detection results are empty or the decision is <code>NOT_ENOUGH_SPEECH</code>. In this situation, if the <code>StreamingStatus</code> is <code>ONGOING/PENDING_CONFIGURATION</code>, it can mean that the client should call the API again later, after Voice ID has enough audio to produce a result. If the decision remains <code>NOT_ENOUGH_SPEECH</code> even after <code>StreamingStatus</code> is <code>ENDED</code>, it means that the previously streamed session did not have enough speech to perform evaluation, and a new streaming session is needed to try again.</p>
pub streaming_status: ::std::option::Option<crate::types::StreamingStatus>,
/// <p>Details resulting from the authentication process, such as authentication decision and authentication score.</p>
pub authentication_result: ::std::option::Option<crate::types::AuthenticationResult>,
/// <p>Details resulting from the fraud detection process, such as fraud detection decision and risk score.</p>
pub fraud_detection_result: ::std::option::Option<crate::types::FraudDetectionResult>,
_request_id: Option<String>,
}
impl EvaluateSessionOutput {
/// <p>The identifier of the domain that contains the session.</p>
pub fn domain_id(&self) -> ::std::option::Option<&str> {
self.domain_id.as_deref()
}
/// <p>The service-generated identifier of the session.</p>
pub fn session_id(&self) -> ::std::option::Option<&str> {
self.session_id.as_deref()
}
/// <p>The client-provided name of the session.</p>
pub fn session_name(&self) -> ::std::option::Option<&str> {
self.session_name.as_deref()
}
/// <p>The current status of audio streaming for this session. This field is useful to infer next steps when the Authentication or Fraud Detection results are empty or the decision is <code>NOT_ENOUGH_SPEECH</code>. In this situation, if the <code>StreamingStatus</code> is <code>ONGOING/PENDING_CONFIGURATION</code>, it can mean that the client should call the API again later, after Voice ID has enough audio to produce a result. If the decision remains <code>NOT_ENOUGH_SPEECH</code> even after <code>StreamingStatus</code> is <code>ENDED</code>, it means that the previously streamed session did not have enough speech to perform evaluation, and a new streaming session is needed to try again.</p>
pub fn streaming_status(&self) -> ::std::option::Option<&crate::types::StreamingStatus> {
self.streaming_status.as_ref()
}
/// <p>Details resulting from the authentication process, such as authentication decision and authentication score.</p>
pub fn authentication_result(&self) -> ::std::option::Option<&crate::types::AuthenticationResult> {
self.authentication_result.as_ref()
}
/// <p>Details resulting from the fraud detection process, such as fraud detection decision and risk score.</p>
pub fn fraud_detection_result(&self) -> ::std::option::Option<&crate::types::FraudDetectionResult> {
self.fraud_detection_result.as_ref()
}
}
impl ::aws_types::request_id::RequestId for EvaluateSessionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl EvaluateSessionOutput {
/// Creates a new builder-style object to manufacture [`EvaluateSessionOutput`](crate::operation::evaluate_session::EvaluateSessionOutput).
pub fn builder() -> crate::operation::evaluate_session::builders::EvaluateSessionOutputBuilder {
crate::operation::evaluate_session::builders::EvaluateSessionOutputBuilder::default()
}
}
/// A builder for [`EvaluateSessionOutput`](crate::operation::evaluate_session::EvaluateSessionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EvaluateSessionOutputBuilder {
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) session_id: ::std::option::Option<::std::string::String>,
pub(crate) session_name: ::std::option::Option<::std::string::String>,
pub(crate) streaming_status: ::std::option::Option<crate::types::StreamingStatus>,
pub(crate) authentication_result: ::std::option::Option<crate::types::AuthenticationResult>,
pub(crate) fraud_detection_result: ::std::option::Option<crate::types::FraudDetectionResult>,
_request_id: Option<String>,
}
impl EvaluateSessionOutputBuilder {
/// <p>The identifier of the domain that contains the session.</p>
pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the domain that contains the session.</p>
pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_id = input;
self
}
/// <p>The identifier of the domain that contains the session.</p>
pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_id
}
/// <p>The service-generated identifier of the session.</p>
pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.session_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The service-generated identifier of the session.</p>
pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.session_id = input;
self
}
/// <p>The service-generated identifier of the session.</p>
pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
&self.session_id
}
/// <p>The client-provided name of the session.</p>
pub fn session_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.session_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The client-provided name of the session.</p>
pub fn set_session_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.session_name = input;
self
}
/// <p>The client-provided name of the session.</p>
pub fn get_session_name(&self) -> &::std::option::Option<::std::string::String> {
&self.session_name
}
/// <p>The current status of audio streaming for this session. This field is useful to infer next steps when the Authentication or Fraud Detection results are empty or the decision is <code>NOT_ENOUGH_SPEECH</code>. In this situation, if the <code>StreamingStatus</code> is <code>ONGOING/PENDING_CONFIGURATION</code>, it can mean that the client should call the API again later, after Voice ID has enough audio to produce a result. If the decision remains <code>NOT_ENOUGH_SPEECH</code> even after <code>StreamingStatus</code> is <code>ENDED</code>, it means that the previously streamed session did not have enough speech to perform evaluation, and a new streaming session is needed to try again.</p>
pub fn streaming_status(mut self, input: crate::types::StreamingStatus) -> Self {
self.streaming_status = ::std::option::Option::Some(input);
self
}
/// <p>The current status of audio streaming for this session. This field is useful to infer next steps when the Authentication or Fraud Detection results are empty or the decision is <code>NOT_ENOUGH_SPEECH</code>. In this situation, if the <code>StreamingStatus</code> is <code>ONGOING/PENDING_CONFIGURATION</code>, it can mean that the client should call the API again later, after Voice ID has enough audio to produce a result. If the decision remains <code>NOT_ENOUGH_SPEECH</code> even after <code>StreamingStatus</code> is <code>ENDED</code>, it means that the previously streamed session did not have enough speech to perform evaluation, and a new streaming session is needed to try again.</p>
pub fn set_streaming_status(mut self, input: ::std::option::Option<crate::types::StreamingStatus>) -> Self {
self.streaming_status = input;
self
}
/// <p>The current status of audio streaming for this session. This field is useful to infer next steps when the Authentication or Fraud Detection results are empty or the decision is <code>NOT_ENOUGH_SPEECH</code>. In this situation, if the <code>StreamingStatus</code> is <code>ONGOING/PENDING_CONFIGURATION</code>, it can mean that the client should call the API again later, after Voice ID has enough audio to produce a result. If the decision remains <code>NOT_ENOUGH_SPEECH</code> even after <code>StreamingStatus</code> is <code>ENDED</code>, it means that the previously streamed session did not have enough speech to perform evaluation, and a new streaming session is needed to try again.</p>
pub fn get_streaming_status(&self) -> &::std::option::Option<crate::types::StreamingStatus> {
&self.streaming_status
}
/// <p>Details resulting from the authentication process, such as authentication decision and authentication score.</p>
pub fn authentication_result(mut self, input: crate::types::AuthenticationResult) -> Self {
self.authentication_result = ::std::option::Option::Some(input);
self
}
/// <p>Details resulting from the authentication process, such as authentication decision and authentication score.</p>
pub fn set_authentication_result(mut self, input: ::std::option::Option<crate::types::AuthenticationResult>) -> Self {
self.authentication_result = input;
self
}
/// <p>Details resulting from the authentication process, such as authentication decision and authentication score.</p>
pub fn get_authentication_result(&self) -> &::std::option::Option<crate::types::AuthenticationResult> {
&self.authentication_result
}
/// <p>Details resulting from the fraud detection process, such as fraud detection decision and risk score.</p>
pub fn fraud_detection_result(mut self, input: crate::types::FraudDetectionResult) -> Self {
self.fraud_detection_result = ::std::option::Option::Some(input);
self
}
/// <p>Details resulting from the fraud detection process, such as fraud detection decision and risk score.</p>
pub fn set_fraud_detection_result(mut self, input: ::std::option::Option<crate::types::FraudDetectionResult>) -> Self {
self.fraud_detection_result = input;
self
}
/// <p>Details resulting from the fraud detection process, such as fraud detection decision and risk score.</p>
pub fn get_fraud_detection_result(&self) -> &::std::option::Option<crate::types::FraudDetectionResult> {
&self.fraud_detection_result
}
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
}
/// Consumes the builder and constructs a [`EvaluateSessionOutput`](crate::operation::evaluate_session::EvaluateSessionOutput).
pub fn build(self) -> crate::operation::evaluate_session::EvaluateSessionOutput {
crate::operation::evaluate_session::EvaluateSessionOutput {
domain_id: self.domain_id,
session_id: self.session_id,
session_name: self.session_name,
streaming_status: self.streaming_status,
authentication_result: self.authentication_result,
fraud_detection_result: self.fraud_detection_result,
_request_id: self._request_id,
}
}
}