#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateTestSuiteInput {
pub name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub before_steps: ::std::option::Option<::std::vec::Vec<crate::types::Step>>,
pub after_steps: ::std::option::Option<::std::vec::Vec<crate::types::Step>>,
pub test_cases: ::std::option::Option<crate::types::TestCases>,
pub client_token: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateTestSuiteInput {
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn before_steps(&self) -> &[crate::types::Step] {
self.before_steps.as_deref().unwrap_or_default()
}
pub fn after_steps(&self) -> &[crate::types::Step] {
self.after_steps.as_deref().unwrap_or_default()
}
pub fn test_cases(&self) -> ::std::option::Option<&crate::types::TestCases> {
self.test_cases.as_ref()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl CreateTestSuiteInput {
pub fn builder() -> crate::operation::create_test_suite::builders::CreateTestSuiteInputBuilder {
crate::operation::create_test_suite::builders::CreateTestSuiteInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateTestSuiteInputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) before_steps: ::std::option::Option<::std::vec::Vec<crate::types::Step>>,
pub(crate) after_steps: ::std::option::Option<::std::vec::Vec<crate::types::Step>>,
pub(crate) test_cases: ::std::option::Option<crate::types::TestCases>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateTestSuiteInputBuilder {
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 before_steps(mut self, input: crate::types::Step) -> Self {
let mut v = self.before_steps.unwrap_or_default();
v.push(input);
self.before_steps = ::std::option::Option::Some(v);
self
}
pub fn set_before_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Step>>) -> Self {
self.before_steps = input;
self
}
pub fn get_before_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Step>> {
&self.before_steps
}
pub fn after_steps(mut self, input: crate::types::Step) -> Self {
let mut v = self.after_steps.unwrap_or_default();
v.push(input);
self.after_steps = ::std::option::Option::Some(v);
self
}
pub fn set_after_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Step>>) -> Self {
self.after_steps = input;
self
}
pub fn get_after_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Step>> {
&self.after_steps
}
pub fn test_cases(mut self, input: crate::types::TestCases) -> Self {
self.test_cases = ::std::option::Option::Some(input);
self
}
pub fn set_test_cases(mut self, input: ::std::option::Option<crate::types::TestCases>) -> Self {
self.test_cases = input;
self
}
pub fn get_test_cases(&self) -> &::std::option::Option<crate::types::TestCases> {
&self.test_cases
}
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
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 fn build(
self,
) -> ::std::result::Result<crate::operation::create_test_suite::CreateTestSuiteInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_test_suite::CreateTestSuiteInput {
name: self.name,
description: self.description,
before_steps: self.before_steps,
after_steps: self.after_steps,
test_cases: self.test_cases,
client_token: self.client_token,
tags: self.tags,
})
}
}