aws_sdk_wellarchitected/operation/create_milestone/
_create_milestone_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Output of a create milestone call.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateMilestoneOutput {
7    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
8    pub workload_id: ::std::option::Option<::std::string::String>,
9    /// <p>The milestone number.</p>
10    /// <p>A workload can have a maximum of 100 milestones.</p>
11    pub milestone_number: ::std::option::Option<i32>,
12    _request_id: Option<String>,
13}
14impl CreateMilestoneOutput {
15    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
16    pub fn workload_id(&self) -> ::std::option::Option<&str> {
17        self.workload_id.as_deref()
18    }
19    /// <p>The milestone number.</p>
20    /// <p>A workload can have a maximum of 100 milestones.</p>
21    pub fn milestone_number(&self) -> ::std::option::Option<i32> {
22        self.milestone_number
23    }
24}
25impl ::aws_types::request_id::RequestId for CreateMilestoneOutput {
26    fn request_id(&self) -> Option<&str> {
27        self._request_id.as_deref()
28    }
29}
30impl CreateMilestoneOutput {
31    /// Creates a new builder-style object to manufacture [`CreateMilestoneOutput`](crate::operation::create_milestone::CreateMilestoneOutput).
32    pub fn builder() -> crate::operation::create_milestone::builders::CreateMilestoneOutputBuilder {
33        crate::operation::create_milestone::builders::CreateMilestoneOutputBuilder::default()
34    }
35}
36
37/// A builder for [`CreateMilestoneOutput`](crate::operation::create_milestone::CreateMilestoneOutput).
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct CreateMilestoneOutputBuilder {
41    pub(crate) workload_id: ::std::option::Option<::std::string::String>,
42    pub(crate) milestone_number: ::std::option::Option<i32>,
43    _request_id: Option<String>,
44}
45impl CreateMilestoneOutputBuilder {
46    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
47    pub fn workload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.workload_id = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
52    pub fn set_workload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.workload_id = input;
54        self
55    }
56    /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
57    pub fn get_workload_id(&self) -> &::std::option::Option<::std::string::String> {
58        &self.workload_id
59    }
60    /// <p>The milestone number.</p>
61    /// <p>A workload can have a maximum of 100 milestones.</p>
62    pub fn milestone_number(mut self, input: i32) -> Self {
63        self.milestone_number = ::std::option::Option::Some(input);
64        self
65    }
66    /// <p>The milestone number.</p>
67    /// <p>A workload can have a maximum of 100 milestones.</p>
68    pub fn set_milestone_number(mut self, input: ::std::option::Option<i32>) -> Self {
69        self.milestone_number = input;
70        self
71    }
72    /// <p>The milestone number.</p>
73    /// <p>A workload can have a maximum of 100 milestones.</p>
74    pub fn get_milestone_number(&self) -> &::std::option::Option<i32> {
75        &self.milestone_number
76    }
77    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
78        self._request_id = Some(request_id.into());
79        self
80    }
81
82    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
83        self._request_id = request_id;
84        self
85    }
86    /// Consumes the builder and constructs a [`CreateMilestoneOutput`](crate::operation::create_milestone::CreateMilestoneOutput).
87    pub fn build(self) -> crate::operation::create_milestone::CreateMilestoneOutput {
88        crate::operation::create_milestone::CreateMilestoneOutput {
89            workload_id: self.workload_id,
90            milestone_number: self.milestone_number,
91            _request_id: self._request_id,
92        }
93    }
94}