aws-sdk-wellarchitected 1.97.0

AWS SDK for AWS Well-Architected Tool
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A milestone return object.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Milestone {
    /// <p>The milestone number.</p>
    /// <p>A workload can have a maximum of 100 milestones.</p>
    pub milestone_number: ::std::option::Option<i32>,
    /// <p>The name of the milestone in a workload.</p>
    /// <p>Milestone names must be unique within a workload.</p>
    pub milestone_name: ::std::option::Option<::std::string::String>,
    /// <p>The date and time recorded.</p>
    pub recorded_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A workload return object.</p>
    pub workload: ::std::option::Option<crate::types::Workload>,
}
impl Milestone {
    /// <p>The milestone number.</p>
    /// <p>A workload can have a maximum of 100 milestones.</p>
    pub fn milestone_number(&self) -> ::std::option::Option<i32> {
        self.milestone_number
    }
    /// <p>The name of the milestone in a workload.</p>
    /// <p>Milestone names must be unique within a workload.</p>
    pub fn milestone_name(&self) -> ::std::option::Option<&str> {
        self.milestone_name.as_deref()
    }
    /// <p>The date and time recorded.</p>
    pub fn recorded_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.recorded_at.as_ref()
    }
    /// <p>A workload return object.</p>
    pub fn workload(&self) -> ::std::option::Option<&crate::types::Workload> {
        self.workload.as_ref()
    }
}
impl Milestone {
    /// Creates a new builder-style object to manufacture [`Milestone`](crate::types::Milestone).
    pub fn builder() -> crate::types::builders::MilestoneBuilder {
        crate::types::builders::MilestoneBuilder::default()
    }
}

/// A builder for [`Milestone`](crate::types::Milestone).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct MilestoneBuilder {
    pub(crate) milestone_number: ::std::option::Option<i32>,
    pub(crate) milestone_name: ::std::option::Option<::std::string::String>,
    pub(crate) recorded_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) workload: ::std::option::Option<crate::types::Workload>,
}
impl MilestoneBuilder {
    /// <p>The milestone number.</p>
    /// <p>A workload can have a maximum of 100 milestones.</p>
    pub fn milestone_number(mut self, input: i32) -> Self {
        self.milestone_number = ::std::option::Option::Some(input);
        self
    }
    /// <p>The milestone number.</p>
    /// <p>A workload can have a maximum of 100 milestones.</p>
    pub fn set_milestone_number(mut self, input: ::std::option::Option<i32>) -> Self {
        self.milestone_number = input;
        self
    }
    /// <p>The milestone number.</p>
    /// <p>A workload can have a maximum of 100 milestones.</p>
    pub fn get_milestone_number(&self) -> &::std::option::Option<i32> {
        &self.milestone_number
    }
    /// <p>The name of the milestone in a workload.</p>
    /// <p>Milestone names must be unique within a workload.</p>
    pub fn milestone_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.milestone_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the milestone in a workload.</p>
    /// <p>Milestone names must be unique within a workload.</p>
    pub fn set_milestone_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.milestone_name = input;
        self
    }
    /// <p>The name of the milestone in a workload.</p>
    /// <p>Milestone names must be unique within a workload.</p>
    pub fn get_milestone_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.milestone_name
    }
    /// <p>The date and time recorded.</p>
    pub fn recorded_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.recorded_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time recorded.</p>
    pub fn set_recorded_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.recorded_at = input;
        self
    }
    /// <p>The date and time recorded.</p>
    pub fn get_recorded_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.recorded_at
    }
    /// <p>A workload return object.</p>
    pub fn workload(mut self, input: crate::types::Workload) -> Self {
        self.workload = ::std::option::Option::Some(input);
        self
    }
    /// <p>A workload return object.</p>
    pub fn set_workload(mut self, input: ::std::option::Option<crate::types::Workload>) -> Self {
        self.workload = input;
        self
    }
    /// <p>A workload return object.</p>
    pub fn get_workload(&self) -> &::std::option::Option<crate::types::Workload> {
        &self.workload
    }
    /// Consumes the builder and constructs a [`Milestone`](crate::types::Milestone).
    pub fn build(self) -> crate::types::Milestone {
        crate::types::Milestone {
            milestone_number: self.milestone_number,
            milestone_name: self.milestone_name,
            recorded_at: self.recorded_at,
            workload: self.workload,
        }
    }
}