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 CreateTestSuiteOutput {
    /// <p>The suite ID of the test suite.</p>
    pub test_suite_id: ::std::string::String,
    /// <p>The suite version of the test suite.</p>
    pub test_suite_version: i32,
    _request_id: Option<String>,
}
impl CreateTestSuiteOutput {
    /// <p>The suite ID of the test suite.</p>
    pub fn test_suite_id(&self) -> &str {
        use std::ops::Deref;
        self.test_suite_id.deref()
    }
    /// <p>The suite version of the test suite.</p>
    pub fn test_suite_version(&self) -> i32 {
        self.test_suite_version
    }
}
impl ::aws_types::request_id::RequestId for CreateTestSuiteOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateTestSuiteOutput {
    /// Creates a new builder-style object to manufacture [`CreateTestSuiteOutput`](crate::operation::create_test_suite::CreateTestSuiteOutput).
    pub fn builder() -> crate::operation::create_test_suite::builders::CreateTestSuiteOutputBuilder {
        crate::operation::create_test_suite::builders::CreateTestSuiteOutputBuilder::default()
    }
}

/// A builder for [`CreateTestSuiteOutput`](crate::operation::create_test_suite::CreateTestSuiteOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateTestSuiteOutputBuilder {
    pub(crate) test_suite_id: ::std::option::Option<::std::string::String>,
    pub(crate) test_suite_version: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl CreateTestSuiteOutputBuilder {
    /// <p>The suite ID of the test suite.</p>
    /// This field is required.
    pub fn test_suite_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.test_suite_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The suite ID of the test suite.</p>
    pub fn set_test_suite_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.test_suite_id = input;
        self
    }
    /// <p>The suite ID of the test suite.</p>
    pub fn get_test_suite_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.test_suite_id
    }
    /// <p>The suite version of the test suite.</p>
    /// This field is required.
    pub fn test_suite_version(mut self, input: i32) -> Self {
        self.test_suite_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>The suite version of the test suite.</p>
    pub fn set_test_suite_version(mut self, input: ::std::option::Option<i32>) -> Self {
        self.test_suite_version = input;
        self
    }
    /// <p>The suite version of the test suite.</p>
    pub fn get_test_suite_version(&self) -> &::std::option::Option<i32> {
        &self.test_suite_version
    }
    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 [`CreateTestSuiteOutput`](crate::operation::create_test_suite::CreateTestSuiteOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`test_suite_id`](crate::operation::create_test_suite::builders::CreateTestSuiteOutputBuilder::test_suite_id)
    /// - [`test_suite_version`](crate::operation::create_test_suite::builders::CreateTestSuiteOutputBuilder::test_suite_version)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_test_suite::CreateTestSuiteOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_test_suite::CreateTestSuiteOutput {
            test_suite_id: self.test_suite_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "test_suite_id",
                    "test_suite_id was not specified but it is required when building CreateTestSuiteOutput",
                )
            })?,
            test_suite_version: self.test_suite_version.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "test_suite_version",
                    "test_suite_version was not specified but it is required when building CreateTestSuiteOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}