#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateTestSuiteInput {
pub test_suite_id: ::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>,
}
impl UpdateTestSuiteInput {
pub fn test_suite_id(&self) -> ::std::option::Option<&str> {
self.test_suite_id.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()
}
}
impl UpdateTestSuiteInput {
pub fn builder() -> crate::operation::update_test_suite::builders::UpdateTestSuiteInputBuilder {
crate::operation::update_test_suite::builders::UpdateTestSuiteInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTestSuiteInputBuilder {
pub(crate) test_suite_id: ::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>,
}
impl UpdateTestSuiteInputBuilder {
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
}
pub fn set_test_suite_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.test_suite_id = input;
self
}
pub fn get_test_suite_id(&self) -> &::std::option::Option<::std::string::String> {
&self.test_suite_id
}
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 build(
self,
) -> ::std::result::Result<crate::operation::update_test_suite::UpdateTestSuiteInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_test_suite::UpdateTestSuiteInput {
test_suite_id: self.test_suite_id,
description: self.description,
before_steps: self.before_steps,
after_steps: self.after_steps,
test_cases: self.test_cases,
})
}
}