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 UpdateTestCaseInput {
    /// <p>The test case ID of the test case.</p>
    pub test_case_id: ::std::option::Option<::std::string::String>,
    /// <p>The description of the test case.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The steps of the test case.</p>
    pub steps: ::std::option::Option<::std::vec::Vec<crate::types::Step>>,
}
impl UpdateTestCaseInput {
    /// <p>The test case ID of the test case.</p>
    pub fn test_case_id(&self) -> ::std::option::Option<&str> {
        self.test_case_id.as_deref()
    }
    /// <p>The description of the test case.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The steps of the test case.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.steps.is_none()`.
    pub fn steps(&self) -> &[crate::types::Step] {
        self.steps.as_deref().unwrap_or_default()
    }
}
impl UpdateTestCaseInput {
    /// Creates a new builder-style object to manufacture [`UpdateTestCaseInput`](crate::operation::update_test_case::UpdateTestCaseInput).
    pub fn builder() -> crate::operation::update_test_case::builders::UpdateTestCaseInputBuilder {
        crate::operation::update_test_case::builders::UpdateTestCaseInputBuilder::default()
    }
}

/// A builder for [`UpdateTestCaseInput`](crate::operation::update_test_case::UpdateTestCaseInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTestCaseInputBuilder {
    pub(crate) test_case_id: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::Step>>,
}
impl UpdateTestCaseInputBuilder {
    /// <p>The test case ID of the test case.</p>
    /// This field is required.
    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
    }
    /// <p>The test case ID of the test case.</p>
    pub fn set_test_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.test_case_id = input;
        self
    }
    /// <p>The test case ID of the test case.</p>
    pub fn get_test_case_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.test_case_id
    }
    /// <p>The description of the test case.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the test case.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the test case.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `steps`.
    ///
    /// To override the contents of this collection use [`set_steps`](Self::set_steps).
    ///
    /// <p>The steps of the test case.</p>
    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
    }
    /// <p>The steps of the test case.</p>
    pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Step>>) -> Self {
        self.steps = input;
        self
    }
    /// <p>The steps of the test case.</p>
    pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Step>> {
        &self.steps
    }
    /// Consumes the builder and constructs a [`UpdateTestCaseInput`](crate::operation::update_test_case::UpdateTestCaseInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_test_case::UpdateTestCaseInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_test_case::UpdateTestCaseInput {
            test_case_id: self.test_case_id,
            description: self.description,
            steps: self.steps,
        })
    }
}