aws-sdk-securityagent 1.1.0

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

/// Represents a single step in pentest job execution
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Step {
    /// Name of the execution step
    pub name: ::std::option::Option<crate::types::StepName>,
    /// Current status of the step
    pub status: ::std::option::Option<crate::types::StepStatus>,
    /// Timestamp when the step was created
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// Timestamp when the step was last updated
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Step {
    /// Name of the execution step
    pub fn name(&self) -> ::std::option::Option<&crate::types::StepName> {
        self.name.as_ref()
    }
    /// Current status of the step
    pub fn status(&self) -> ::std::option::Option<&crate::types::StepStatus> {
        self.status.as_ref()
    }
    /// Timestamp when the step was created
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// Timestamp when the step was last updated
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
}
impl Step {
    /// Creates a new builder-style object to manufacture [`Step`](crate::types::Step).
    pub fn builder() -> crate::types::builders::StepBuilder {
        crate::types::builders::StepBuilder::default()
    }
}

/// A builder for [`Step`](crate::types::Step).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StepBuilder {
    pub(crate) name: ::std::option::Option<crate::types::StepName>,
    pub(crate) status: ::std::option::Option<crate::types::StepStatus>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl StepBuilder {
    /// Name of the execution step
    pub fn name(mut self, input: crate::types::StepName) -> Self {
        self.name = ::std::option::Option::Some(input);
        self
    }
    /// Name of the execution step
    pub fn set_name(mut self, input: ::std::option::Option<crate::types::StepName>) -> Self {
        self.name = input;
        self
    }
    /// Name of the execution step
    pub fn get_name(&self) -> &::std::option::Option<crate::types::StepName> {
        &self.name
    }
    /// Current status of the step
    pub fn status(mut self, input: crate::types::StepStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// Current status of the step
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::StepStatus>) -> Self {
        self.status = input;
        self
    }
    /// Current status of the step
    pub fn get_status(&self) -> &::std::option::Option<crate::types::StepStatus> {
        &self.status
    }
    /// Timestamp when the step was created
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// Timestamp when the step was created
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// Timestamp when the step was created
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// Timestamp when the step was last updated
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// Timestamp when the step was last updated
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// Timestamp when the step was last updated
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// Consumes the builder and constructs a [`Step`](crate::types::Step).
    pub fn build(self) -> crate::types::Step {
        crate::types::Step {
            name: self.name,
            status: self.status,
            created_at: self.created_at,
            updated_at: self.updated_at,
        }
    }
}