aws-sdk-apptest 1.57.0

AWS SDK for AWS Mainframe Modernization Application Testing
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 GetTestCaseOutput {
    /// <p>The response test ID of the test case.</p>
    pub test_case_id: ::std::string::String,
    /// <p>The Amazon Resource Name (ARN) of the test case.</p>
    pub test_case_arn: ::std::string::String,
    /// <p>The name of the test case.</p>
    pub name: ::std::string::String,
    /// <p>The description of the test case.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The latest version of the test case.</p>
    pub latest_version: ::std::option::Option<crate::types::TestCaseLatestVersion>,
    /// <p>The case version of the test case.</p>
    pub test_case_version: i32,
    /// <p>The status of the test case.</p>
    pub status: crate::types::TestCaseLifecycle,
    /// <p>The status reason of the test case.</p>
    pub status_reason: ::std::option::Option<::std::string::String>,
    /// <p>The creation time of the test case.</p>
    pub creation_time: ::aws_smithy_types::DateTime,
    /// <p>The last update time of the test case.</p>
    pub last_update_time: ::aws_smithy_types::DateTime,
    /// <p>The steps of the test case.</p>
    pub steps: ::std::vec::Vec<crate::types::Step>,
    /// <p>The tags of the test case.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl GetTestCaseOutput {
    /// <p>The response test ID of the test case.</p>
    pub fn test_case_id(&self) -> &str {
        use std::ops::Deref;
        self.test_case_id.deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the test case.</p>
    pub fn test_case_arn(&self) -> &str {
        use std::ops::Deref;
        self.test_case_arn.deref()
    }
    /// <p>The name of the test case.</p>
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// <p>The description of the test case.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The latest version of the test case.</p>
    pub fn latest_version(&self) -> ::std::option::Option<&crate::types::TestCaseLatestVersion> {
        self.latest_version.as_ref()
    }
    /// <p>The case version of the test case.</p>
    pub fn test_case_version(&self) -> i32 {
        self.test_case_version
    }
    /// <p>The status of the test case.</p>
    pub fn status(&self) -> &crate::types::TestCaseLifecycle {
        &self.status
    }
    /// <p>The status reason of the test case.</p>
    pub fn status_reason(&self) -> ::std::option::Option<&str> {
        self.status_reason.as_deref()
    }
    /// <p>The creation time of the test case.</p>
    pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
        &self.creation_time
    }
    /// <p>The last update time of the test case.</p>
    pub fn last_update_time(&self) -> &::aws_smithy_types::DateTime {
        &self.last_update_time
    }
    /// <p>The steps of the test case.</p>
    pub fn steps(&self) -> &[crate::types::Step] {
        use std::ops::Deref;
        self.steps.deref()
    }
    /// <p>The tags of the test case.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetTestCaseOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetTestCaseOutput {
    /// Creates a new builder-style object to manufacture [`GetTestCaseOutput`](crate::operation::get_test_case::GetTestCaseOutput).
    pub fn builder() -> crate::operation::get_test_case::builders::GetTestCaseOutputBuilder {
        crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::default()
    }
}

/// A builder for [`GetTestCaseOutput`](crate::operation::get_test_case::GetTestCaseOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetTestCaseOutputBuilder {
    pub(crate) test_case_id: ::std::option::Option<::std::string::String>,
    pub(crate) test_case_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) latest_version: ::std::option::Option<crate::types::TestCaseLatestVersion>,
    pub(crate) test_case_version: ::std::option::Option<i32>,
    pub(crate) status: ::std::option::Option<crate::types::TestCaseLifecycle>,
    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::Step>>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl GetTestCaseOutputBuilder {
    /// <p>The response test ID of the test case.</p>
    /// This field is required.
    pub fn test_case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.test_case_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The response test ID of the test case.</p>
    pub fn set_test_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.test_case_id = input;
        self
    }
    /// <p>The response test ID of the test case.</p>
    pub fn get_test_case_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.test_case_id
    }
    /// <p>The Amazon Resource Name (ARN) of the test case.</p>
    /// This field is required.
    pub fn test_case_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.test_case_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the test case.</p>
    pub fn set_test_case_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.test_case_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the test case.</p>
    pub fn get_test_case_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.test_case_arn
    }
    /// <p>The name of the test case.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the test case.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the test case.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the test case.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the test case.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the test case.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The latest version of the test case.</p>
    /// This field is required.
    pub fn latest_version(mut self, input: crate::types::TestCaseLatestVersion) -> Self {
        self.latest_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>The latest version of the test case.</p>
    pub fn set_latest_version(mut self, input: ::std::option::Option<crate::types::TestCaseLatestVersion>) -> Self {
        self.latest_version = input;
        self
    }
    /// <p>The latest version of the test case.</p>
    pub fn get_latest_version(&self) -> &::std::option::Option<crate::types::TestCaseLatestVersion> {
        &self.latest_version
    }
    /// <p>The case version of the test case.</p>
    /// This field is required.
    pub fn test_case_version(mut self, input: i32) -> Self {
        self.test_case_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>The case version of the test case.</p>
    pub fn set_test_case_version(mut self, input: ::std::option::Option<i32>) -> Self {
        self.test_case_version = input;
        self
    }
    /// <p>The case version of the test case.</p>
    pub fn get_test_case_version(&self) -> &::std::option::Option<i32> {
        &self.test_case_version
    }
    /// <p>The status of the test case.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::TestCaseLifecycle) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the test case.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::TestCaseLifecycle>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the test case.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::TestCaseLifecycle> {
        &self.status
    }
    /// <p>The status reason of the test case.</p>
    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status reason of the test case.</p>
    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_reason = input;
        self
    }
    /// <p>The status reason of the test case.</p>
    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_reason
    }
    /// <p>The creation time of the test case.</p>
    /// This field is required.
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The creation time of the test case.</p>
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>The creation time of the test case.</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The last update time of the test case.</p>
    /// This field is required.
    pub fn last_update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_update_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last update time of the test case.</p>
    pub fn set_last_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_update_time = input;
        self
    }
    /// <p>The last update time of the test case.</p>
    pub fn get_last_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_update_time
    }
    /// Appends an item to `steps`.
    ///
    /// To override the contents of this collection use [`set_steps`](Self::set_steps).
    ///
    /// <p>The steps of the test case.</p>
    pub fn steps(mut self, input: crate::types::Step) -> Self {
        let mut v = self.steps.unwrap_or_default();
        v.push(input);
        self.steps = ::std::option::Option::Some(v);
        self
    }
    /// <p>The steps of the test case.</p>
    pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Step>>) -> Self {
        self.steps = input;
        self
    }
    /// <p>The steps of the test case.</p>
    pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Step>> {
        &self.steps
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags of the test case.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags of the test case.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags of the test case.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    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 [`GetTestCaseOutput`](crate::operation::get_test_case::GetTestCaseOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`test_case_id`](crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::test_case_id)
    /// - [`test_case_arn`](crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::test_case_arn)
    /// - [`name`](crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::name)
    /// - [`test_case_version`](crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::test_case_version)
    /// - [`status`](crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::status)
    /// - [`creation_time`](crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::creation_time)
    /// - [`last_update_time`](crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::last_update_time)
    /// - [`steps`](crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::steps)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_test_case::GetTestCaseOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_test_case::GetTestCaseOutput {
            test_case_id: self.test_case_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "test_case_id",
                    "test_case_id was not specified but it is required when building GetTestCaseOutput",
                )
            })?,
            test_case_arn: self.test_case_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "test_case_arn",
                    "test_case_arn was not specified but it is required when building GetTestCaseOutput",
                )
            })?,
            name: self.name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "name",
                    "name was not specified but it is required when building GetTestCaseOutput",
                )
            })?,
            description: self.description,
            latest_version: self.latest_version,
            test_case_version: self.test_case_version.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "test_case_version",
                    "test_case_version was not specified but it is required when building GetTestCaseOutput",
                )
            })?,
            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 GetTestCaseOutput",
                )
            })?,
            status_reason: self.status_reason,
            creation_time: self.creation_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "creation_time",
                    "creation_time was not specified but it is required when building GetTestCaseOutput",
                )
            })?,
            last_update_time: self.last_update_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "last_update_time",
                    "last_update_time was not specified but it is required when building GetTestCaseOutput",
                )
            })?,
            steps: self.steps.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "steps",
                    "steps was not specified but it is required when building GetTestCaseOutput",
                )
            })?,
            tags: self.tags,
            _request_id: self._request_id,
        })
    }
}