aws-sdk-lexmodelsv2 1.110.0

AWS SDK for Amazon Lex Model Building V2
Documentation
// 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 StartTestExecutionInput {
    /// <p>The test set Id for the test set execution.</p>
    pub test_set_id: ::std::option::Option<::std::string::String>,
    /// <p>The target bot for the test set execution.</p>
    pub target: ::std::option::Option<crate::types::TestExecutionTarget>,
    /// <p>Indicates whether we use streaming or non-streaming APIs for the test set execution. For streaming, StartConversation Runtime API is used. Whereas, for non-streaming, RecognizeUtterance and RecognizeText Amazon Lex Runtime API are used.</p>
    pub api_mode: ::std::option::Option<crate::types::TestExecutionApiMode>,
    /// <p>Indicates whether audio or text is used.</p>
    pub test_execution_modality: ::std::option::Option<crate::types::TestExecutionModality>,
}
impl StartTestExecutionInput {
    /// <p>The test set Id for the test set execution.</p>
    pub fn test_set_id(&self) -> ::std::option::Option<&str> {
        self.test_set_id.as_deref()
    }
    /// <p>The target bot for the test set execution.</p>
    pub fn target(&self) -> ::std::option::Option<&crate::types::TestExecutionTarget> {
        self.target.as_ref()
    }
    /// <p>Indicates whether we use streaming or non-streaming APIs for the test set execution. For streaming, StartConversation Runtime API is used. Whereas, for non-streaming, RecognizeUtterance and RecognizeText Amazon Lex Runtime API are used.</p>
    pub fn api_mode(&self) -> ::std::option::Option<&crate::types::TestExecutionApiMode> {
        self.api_mode.as_ref()
    }
    /// <p>Indicates whether audio or text is used.</p>
    pub fn test_execution_modality(&self) -> ::std::option::Option<&crate::types::TestExecutionModality> {
        self.test_execution_modality.as_ref()
    }
}
impl StartTestExecutionInput {
    /// Creates a new builder-style object to manufacture [`StartTestExecutionInput`](crate::operation::start_test_execution::StartTestExecutionInput).
    pub fn builder() -> crate::operation::start_test_execution::builders::StartTestExecutionInputBuilder {
        crate::operation::start_test_execution::builders::StartTestExecutionInputBuilder::default()
    }
}

/// A builder for [`StartTestExecutionInput`](crate::operation::start_test_execution::StartTestExecutionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartTestExecutionInputBuilder {
    pub(crate) test_set_id: ::std::option::Option<::std::string::String>,
    pub(crate) target: ::std::option::Option<crate::types::TestExecutionTarget>,
    pub(crate) api_mode: ::std::option::Option<crate::types::TestExecutionApiMode>,
    pub(crate) test_execution_modality: ::std::option::Option<crate::types::TestExecutionModality>,
}
impl StartTestExecutionInputBuilder {
    /// <p>The test set Id for the test set execution.</p>
    /// This field is required.
    pub fn test_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.test_set_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The test set Id for the test set execution.</p>
    pub fn set_test_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.test_set_id = input;
        self
    }
    /// <p>The test set Id for the test set execution.</p>
    pub fn get_test_set_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.test_set_id
    }
    /// <p>The target bot for the test set execution.</p>
    /// This field is required.
    pub fn target(mut self, input: crate::types::TestExecutionTarget) -> Self {
        self.target = ::std::option::Option::Some(input);
        self
    }
    /// <p>The target bot for the test set execution.</p>
    pub fn set_target(mut self, input: ::std::option::Option<crate::types::TestExecutionTarget>) -> Self {
        self.target = input;
        self
    }
    /// <p>The target bot for the test set execution.</p>
    pub fn get_target(&self) -> &::std::option::Option<crate::types::TestExecutionTarget> {
        &self.target
    }
    /// <p>Indicates whether we use streaming or non-streaming APIs for the test set execution. For streaming, StartConversation Runtime API is used. Whereas, for non-streaming, RecognizeUtterance and RecognizeText Amazon Lex Runtime API are used.</p>
    /// This field is required.
    pub fn api_mode(mut self, input: crate::types::TestExecutionApiMode) -> Self {
        self.api_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether we use streaming or non-streaming APIs for the test set execution. For streaming, StartConversation Runtime API is used. Whereas, for non-streaming, RecognizeUtterance and RecognizeText Amazon Lex Runtime API are used.</p>
    pub fn set_api_mode(mut self, input: ::std::option::Option<crate::types::TestExecutionApiMode>) -> Self {
        self.api_mode = input;
        self
    }
    /// <p>Indicates whether we use streaming or non-streaming APIs for the test set execution. For streaming, StartConversation Runtime API is used. Whereas, for non-streaming, RecognizeUtterance and RecognizeText Amazon Lex Runtime API are used.</p>
    pub fn get_api_mode(&self) -> &::std::option::Option<crate::types::TestExecutionApiMode> {
        &self.api_mode
    }
    /// <p>Indicates whether audio or text is used.</p>
    pub fn test_execution_modality(mut self, input: crate::types::TestExecutionModality) -> Self {
        self.test_execution_modality = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether audio or text is used.</p>
    pub fn set_test_execution_modality(mut self, input: ::std::option::Option<crate::types::TestExecutionModality>) -> Self {
        self.test_execution_modality = input;
        self
    }
    /// <p>Indicates whether audio or text is used.</p>
    pub fn get_test_execution_modality(&self) -> &::std::option::Option<crate::types::TestExecutionModality> {
        &self.test_execution_modality
    }
    /// Consumes the builder and constructs a [`StartTestExecutionInput`](crate::operation::start_test_execution::StartTestExecutionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_test_execution::StartTestExecutionInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::start_test_execution::StartTestExecutionInput {
            test_set_id: self.test_set_id,
            target: self.target,
            api_mode: self.api_mode,
            test_execution_modality: self.test_execution_modality,
        })
    }
}