#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateTestCaseOutput {
pub test_case_id: ::std::string::String,
pub test_case_version: i32,
_request_id: Option<String>,
}
impl CreateTestCaseOutput {
pub fn test_case_id(&self) -> &str {
use std::ops::Deref;
self.test_case_id.deref()
}
pub fn test_case_version(&self) -> i32 {
self.test_case_version
}
}
impl ::aws_types::request_id::RequestId for CreateTestCaseOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateTestCaseOutput {
pub fn builder() -> crate::operation::create_test_case::builders::CreateTestCaseOutputBuilder {
crate::operation::create_test_case::builders::CreateTestCaseOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateTestCaseOutputBuilder {
pub(crate) test_case_id: ::std::option::Option<::std::string::String>,
pub(crate) test_case_version: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl CreateTestCaseOutputBuilder {
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
}
pub fn set_test_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.test_case_id = input;
self
}
pub fn get_test_case_id(&self) -> &::std::option::Option<::std::string::String> {
&self.test_case_id
}
pub fn test_case_version(mut self, input: i32) -> Self {
self.test_case_version = ::std::option::Option::Some(input);
self
}
pub fn set_test_case_version(mut self, input: ::std::option::Option<i32>) -> Self {
self.test_case_version = input;
self
}
pub fn get_test_case_version(&self) -> &::std::option::Option<i32> {
&self.test_case_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
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_test_case::CreateTestCaseOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_test_case::CreateTestCaseOutput {
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 CreateTestCaseOutput",
)
})?,
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 CreateTestCaseOutput",
)
})?,
_request_id: self._request_id,
})
}
}