aws_sdk_wellarchitected/operation/get_milestone/
_get_milestone_output.rs

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