aws-sdk-devicefarm 1.103.0

AWS SDK for AWS Device Farm
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents a specific warning or failure.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Problem {
    /// <p>Information about the associated run.</p>
    pub run: ::std::option::Option<crate::types::ProblemDetail>,
    /// <p>Information about the associated job.</p>
    pub job: ::std::option::Option<crate::types::ProblemDetail>,
    /// <p>Information about the associated suite.</p>
    pub suite: ::std::option::Option<crate::types::ProblemDetail>,
    /// <p>Information about the associated test.</p>
    pub test: ::std::option::Option<crate::types::ProblemDetail>,
    /// <p>Information about the associated device.</p>
    pub device: ::std::option::Option<crate::types::Device>,
    /// <p>The problem's result.</p>
    /// <p>Allowed values include:</p>
    /// <ul>
    /// <li>
    /// <p>PENDING</p></li>
    /// <li>
    /// <p>PASSED</p></li>
    /// <li>
    /// <p>WARNED</p></li>
    /// <li>
    /// <p>FAILED</p></li>
    /// <li>
    /// <p>SKIPPED</p></li>
    /// <li>
    /// <p>ERRORED</p></li>
    /// <li>
    /// <p>STOPPED</p></li>
    /// </ul>
    pub result: ::std::option::Option<crate::types::ExecutionResult>,
    /// <p>A message about the problem's result.</p>
    pub message: ::std::option::Option<::std::string::String>,
}
impl Problem {
    /// <p>Information about the associated run.</p>
    pub fn run(&self) -> ::std::option::Option<&crate::types::ProblemDetail> {
        self.run.as_ref()
    }
    /// <p>Information about the associated job.</p>
    pub fn job(&self) -> ::std::option::Option<&crate::types::ProblemDetail> {
        self.job.as_ref()
    }
    /// <p>Information about the associated suite.</p>
    pub fn suite(&self) -> ::std::option::Option<&crate::types::ProblemDetail> {
        self.suite.as_ref()
    }
    /// <p>Information about the associated test.</p>
    pub fn test(&self) -> ::std::option::Option<&crate::types::ProblemDetail> {
        self.test.as_ref()
    }
    /// <p>Information about the associated device.</p>
    pub fn device(&self) -> ::std::option::Option<&crate::types::Device> {
        self.device.as_ref()
    }
    /// <p>The problem's result.</p>
    /// <p>Allowed values include:</p>
    /// <ul>
    /// <li>
    /// <p>PENDING</p></li>
    /// <li>
    /// <p>PASSED</p></li>
    /// <li>
    /// <p>WARNED</p></li>
    /// <li>
    /// <p>FAILED</p></li>
    /// <li>
    /// <p>SKIPPED</p></li>
    /// <li>
    /// <p>ERRORED</p></li>
    /// <li>
    /// <p>STOPPED</p></li>
    /// </ul>
    pub fn result(&self) -> ::std::option::Option<&crate::types::ExecutionResult> {
        self.result.as_ref()
    }
    /// <p>A message about the problem's result.</p>
    pub fn message(&self) -> ::std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl Problem {
    /// Creates a new builder-style object to manufacture [`Problem`](crate::types::Problem).
    pub fn builder() -> crate::types::builders::ProblemBuilder {
        crate::types::builders::ProblemBuilder::default()
    }
}

/// A builder for [`Problem`](crate::types::Problem).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ProblemBuilder {
    pub(crate) run: ::std::option::Option<crate::types::ProblemDetail>,
    pub(crate) job: ::std::option::Option<crate::types::ProblemDetail>,
    pub(crate) suite: ::std::option::Option<crate::types::ProblemDetail>,
    pub(crate) test: ::std::option::Option<crate::types::ProblemDetail>,
    pub(crate) device: ::std::option::Option<crate::types::Device>,
    pub(crate) result: ::std::option::Option<crate::types::ExecutionResult>,
    pub(crate) message: ::std::option::Option<::std::string::String>,
}
impl ProblemBuilder {
    /// <p>Information about the associated run.</p>
    pub fn run(mut self, input: crate::types::ProblemDetail) -> Self {
        self.run = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the associated run.</p>
    pub fn set_run(mut self, input: ::std::option::Option<crate::types::ProblemDetail>) -> Self {
        self.run = input;
        self
    }
    /// <p>Information about the associated run.</p>
    pub fn get_run(&self) -> &::std::option::Option<crate::types::ProblemDetail> {
        &self.run
    }
    /// <p>Information about the associated job.</p>
    pub fn job(mut self, input: crate::types::ProblemDetail) -> Self {
        self.job = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the associated job.</p>
    pub fn set_job(mut self, input: ::std::option::Option<crate::types::ProblemDetail>) -> Self {
        self.job = input;
        self
    }
    /// <p>Information about the associated job.</p>
    pub fn get_job(&self) -> &::std::option::Option<crate::types::ProblemDetail> {
        &self.job
    }
    /// <p>Information about the associated suite.</p>
    pub fn suite(mut self, input: crate::types::ProblemDetail) -> Self {
        self.suite = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the associated suite.</p>
    pub fn set_suite(mut self, input: ::std::option::Option<crate::types::ProblemDetail>) -> Self {
        self.suite = input;
        self
    }
    /// <p>Information about the associated suite.</p>
    pub fn get_suite(&self) -> &::std::option::Option<crate::types::ProblemDetail> {
        &self.suite
    }
    /// <p>Information about the associated test.</p>
    pub fn test(mut self, input: crate::types::ProblemDetail) -> Self {
        self.test = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the associated test.</p>
    pub fn set_test(mut self, input: ::std::option::Option<crate::types::ProblemDetail>) -> Self {
        self.test = input;
        self
    }
    /// <p>Information about the associated test.</p>
    pub fn get_test(&self) -> &::std::option::Option<crate::types::ProblemDetail> {
        &self.test
    }
    /// <p>Information about the associated device.</p>
    pub fn device(mut self, input: crate::types::Device) -> Self {
        self.device = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the associated device.</p>
    pub fn set_device(mut self, input: ::std::option::Option<crate::types::Device>) -> Self {
        self.device = input;
        self
    }
    /// <p>Information about the associated device.</p>
    pub fn get_device(&self) -> &::std::option::Option<crate::types::Device> {
        &self.device
    }
    /// <p>The problem's result.</p>
    /// <p>Allowed values include:</p>
    /// <ul>
    /// <li>
    /// <p>PENDING</p></li>
    /// <li>
    /// <p>PASSED</p></li>
    /// <li>
    /// <p>WARNED</p></li>
    /// <li>
    /// <p>FAILED</p></li>
    /// <li>
    /// <p>SKIPPED</p></li>
    /// <li>
    /// <p>ERRORED</p></li>
    /// <li>
    /// <p>STOPPED</p></li>
    /// </ul>
    pub fn result(mut self, input: crate::types::ExecutionResult) -> Self {
        self.result = ::std::option::Option::Some(input);
        self
    }
    /// <p>The problem's result.</p>
    /// <p>Allowed values include:</p>
    /// <ul>
    /// <li>
    /// <p>PENDING</p></li>
    /// <li>
    /// <p>PASSED</p></li>
    /// <li>
    /// <p>WARNED</p></li>
    /// <li>
    /// <p>FAILED</p></li>
    /// <li>
    /// <p>SKIPPED</p></li>
    /// <li>
    /// <p>ERRORED</p></li>
    /// <li>
    /// <p>STOPPED</p></li>
    /// </ul>
    pub fn set_result(mut self, input: ::std::option::Option<crate::types::ExecutionResult>) -> Self {
        self.result = input;
        self
    }
    /// <p>The problem's result.</p>
    /// <p>Allowed values include:</p>
    /// <ul>
    /// <li>
    /// <p>PENDING</p></li>
    /// <li>
    /// <p>PASSED</p></li>
    /// <li>
    /// <p>WARNED</p></li>
    /// <li>
    /// <p>FAILED</p></li>
    /// <li>
    /// <p>SKIPPED</p></li>
    /// <li>
    /// <p>ERRORED</p></li>
    /// <li>
    /// <p>STOPPED</p></li>
    /// </ul>
    pub fn get_result(&self) -> &::std::option::Option<crate::types::ExecutionResult> {
        &self.result
    }
    /// <p>A message about the problem's result.</p>
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A message about the problem's result.</p>
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message = input;
        self
    }
    /// <p>A message about the problem's result.</p>
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.message
    }
    /// Consumes the builder and constructs a [`Problem`](crate::types::Problem).
    pub fn build(self) -> crate::types::Problem {
        crate::types::Problem {
            run: self.run,
            job: self.job,
            suite: self.suite,
            test: self.test,
            device: self.device,
            result: self.result,
            message: self.message,
        }
    }
}