#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetTestCaseOutput {
pub test_case_id: ::std::string::String,
pub test_case_arn: ::std::string::String,
pub name: ::std::string::String,
pub description: ::std::option::Option<::std::string::String>,
pub latest_version: ::std::option::Option<crate::types::TestCaseLatestVersion>,
pub test_case_version: i32,
pub status: crate::types::TestCaseLifecycle,
pub status_reason: ::std::option::Option<::std::string::String>,
pub creation_time: ::aws_smithy_types::DateTime,
pub last_update_time: ::aws_smithy_types::DateTime,
pub steps: ::std::vec::Vec<crate::types::Step>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetTestCaseOutput {
pub fn test_case_id(&self) -> &str {
use std::ops::Deref;
self.test_case_id.deref()
}
pub fn test_case_arn(&self) -> &str {
use std::ops::Deref;
self.test_case_arn.deref()
}
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn latest_version(&self) -> ::std::option::Option<&crate::types::TestCaseLatestVersion> {
self.latest_version.as_ref()
}
pub fn test_case_version(&self) -> i32 {
self.test_case_version
}
pub fn status(&self) -> &crate::types::TestCaseLifecycle {
&self.status
}
pub fn status_reason(&self) -> ::std::option::Option<&str> {
self.status_reason.as_deref()
}
pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
&self.creation_time
}
pub fn last_update_time(&self) -> &::aws_smithy_types::DateTime {
&self.last_update_time
}
pub fn steps(&self) -> &[crate::types::Step] {
use std::ops::Deref;
self.steps.deref()
}
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 {
pub fn builder() -> crate::operation::get_test_case::builders::GetTestCaseOutputBuilder {
crate::operation::get_test_case::builders::GetTestCaseOutputBuilder::default()
}
}
#[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 {
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_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.test_case_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_test_case_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.test_case_arn = input;
self
}
pub fn get_test_case_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.test_case_arn
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn latest_version(mut self, input: crate::types::TestCaseLatestVersion) -> Self {
self.latest_version = ::std::option::Option::Some(input);
self
}
pub fn set_latest_version(mut self, input: ::std::option::Option<crate::types::TestCaseLatestVersion>) -> Self {
self.latest_version = input;
self
}
pub fn get_latest_version(&self) -> &::std::option::Option<crate::types::TestCaseLatestVersion> {
&self.latest_version
}
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 fn status(mut self, input: crate::types::TestCaseLifecycle) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::TestCaseLifecycle>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::TestCaseLifecycle> {
&self.status
}
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
}
pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_reason = input;
self
}
pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.status_reason
}
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
pub fn last_update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_update_time = ::std::option::Option::Some(input);
self
}
pub fn set_last_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_update_time = input;
self
}
pub fn get_last_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_update_time
}
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
}
pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Step>>) -> Self {
self.steps = input;
self
}
pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Step>> {
&self.steps
}
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
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
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
}
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,
})
}
}