aws_sdk_wellarchitected/operation/get_answer/_get_answer_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Output of a get answer call.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetAnswerOutput {
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 /// <p>The alias of the lens.</p>
13 /// <p>For Amazon Web Services official lenses, this is either the lens alias, such as <code>serverless</code>, or the lens ARN, such as <code>arn:aws:wellarchitected:us-east-1::lens/serverless</code>. Note that some operations (such as ExportLens and CreateLensShare) are not permitted on Amazon Web Services official lenses.</p>
14 /// <p>For custom lenses, this is the lens ARN, such as <code>arn:aws:wellarchitected:us-west-2:123456789012:lens/0123456789abcdef01234567890abcdef</code>.</p>
15 /// <p>Each lens is identified by its <code>LensSummary$LensAlias</code>.</p>
16 pub lens_alias: ::std::option::Option<::std::string::String>,
17 /// <p>The ARN for the lens.</p>
18 pub lens_arn: ::std::option::Option<::std::string::String>,
19 /// <p>An answer of the question.</p>
20 pub answer: ::std::option::Option<crate::types::Answer>,
21 _request_id: Option<String>,
22}
23impl GetAnswerOutput {
24 /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
25 pub fn workload_id(&self) -> ::std::option::Option<&str> {
26 self.workload_id.as_deref()
27 }
28 /// <p>The milestone number.</p>
29 /// <p>A workload can have a maximum of 100 milestones.</p>
30 pub fn milestone_number(&self) -> ::std::option::Option<i32> {
31 self.milestone_number
32 }
33 /// <p>The alias of the lens.</p>
34 /// <p>For Amazon Web Services official lenses, this is either the lens alias, such as <code>serverless</code>, or the lens ARN, such as <code>arn:aws:wellarchitected:us-east-1::lens/serverless</code>. Note that some operations (such as ExportLens and CreateLensShare) are not permitted on Amazon Web Services official lenses.</p>
35 /// <p>For custom lenses, this is the lens ARN, such as <code>arn:aws:wellarchitected:us-west-2:123456789012:lens/0123456789abcdef01234567890abcdef</code>.</p>
36 /// <p>Each lens is identified by its <code>LensSummary$LensAlias</code>.</p>
37 pub fn lens_alias(&self) -> ::std::option::Option<&str> {
38 self.lens_alias.as_deref()
39 }
40 /// <p>The ARN for the lens.</p>
41 pub fn lens_arn(&self) -> ::std::option::Option<&str> {
42 self.lens_arn.as_deref()
43 }
44 /// <p>An answer of the question.</p>
45 pub fn answer(&self) -> ::std::option::Option<&crate::types::Answer> {
46 self.answer.as_ref()
47 }
48}
49impl ::aws_types::request_id::RequestId for GetAnswerOutput {
50 fn request_id(&self) -> Option<&str> {
51 self._request_id.as_deref()
52 }
53}
54impl GetAnswerOutput {
55 /// Creates a new builder-style object to manufacture [`GetAnswerOutput`](crate::operation::get_answer::GetAnswerOutput).
56 pub fn builder() -> crate::operation::get_answer::builders::GetAnswerOutputBuilder {
57 crate::operation::get_answer::builders::GetAnswerOutputBuilder::default()
58 }
59}
60
61/// A builder for [`GetAnswerOutput`](crate::operation::get_answer::GetAnswerOutput).
62#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
63#[non_exhaustive]
64pub struct GetAnswerOutputBuilder {
65 pub(crate) workload_id: ::std::option::Option<::std::string::String>,
66 pub(crate) milestone_number: ::std::option::Option<i32>,
67 pub(crate) lens_alias: ::std::option::Option<::std::string::String>,
68 pub(crate) lens_arn: ::std::option::Option<::std::string::String>,
69 pub(crate) answer: ::std::option::Option<crate::types::Answer>,
70 _request_id: Option<String>,
71}
72impl GetAnswerOutputBuilder {
73 /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
74 pub fn workload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.workload_id = ::std::option::Option::Some(input.into());
76 self
77 }
78 /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
79 pub fn set_workload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.workload_id = input;
81 self
82 }
83 /// <p>The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.</p>
84 pub fn get_workload_id(&self) -> &::std::option::Option<::std::string::String> {
85 &self.workload_id
86 }
87 /// <p>The milestone number.</p>
88 /// <p>A workload can have a maximum of 100 milestones.</p>
89 pub fn milestone_number(mut self, input: i32) -> Self {
90 self.milestone_number = ::std::option::Option::Some(input);
91 self
92 }
93 /// <p>The milestone number.</p>
94 /// <p>A workload can have a maximum of 100 milestones.</p>
95 pub fn set_milestone_number(mut self, input: ::std::option::Option<i32>) -> Self {
96 self.milestone_number = input;
97 self
98 }
99 /// <p>The milestone number.</p>
100 /// <p>A workload can have a maximum of 100 milestones.</p>
101 pub fn get_milestone_number(&self) -> &::std::option::Option<i32> {
102 &self.milestone_number
103 }
104 /// <p>The alias of the lens.</p>
105 /// <p>For Amazon Web Services official lenses, this is either the lens alias, such as <code>serverless</code>, or the lens ARN, such as <code>arn:aws:wellarchitected:us-east-1::lens/serverless</code>. Note that some operations (such as ExportLens and CreateLensShare) are not permitted on Amazon Web Services official lenses.</p>
106 /// <p>For custom lenses, this is the lens ARN, such as <code>arn:aws:wellarchitected:us-west-2:123456789012:lens/0123456789abcdef01234567890abcdef</code>.</p>
107 /// <p>Each lens is identified by its <code>LensSummary$LensAlias</code>.</p>
108 pub fn lens_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.lens_alias = ::std::option::Option::Some(input.into());
110 self
111 }
112 /// <p>The alias of the lens.</p>
113 /// <p>For Amazon Web Services official lenses, this is either the lens alias, such as <code>serverless</code>, or the lens ARN, such as <code>arn:aws:wellarchitected:us-east-1::lens/serverless</code>. Note that some operations (such as ExportLens and CreateLensShare) are not permitted on Amazon Web Services official lenses.</p>
114 /// <p>For custom lenses, this is the lens ARN, such as <code>arn:aws:wellarchitected:us-west-2:123456789012:lens/0123456789abcdef01234567890abcdef</code>.</p>
115 /// <p>Each lens is identified by its <code>LensSummary$LensAlias</code>.</p>
116 pub fn set_lens_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117 self.lens_alias = input;
118 self
119 }
120 /// <p>The alias of the lens.</p>
121 /// <p>For Amazon Web Services official lenses, this is either the lens alias, such as <code>serverless</code>, or the lens ARN, such as <code>arn:aws:wellarchitected:us-east-1::lens/serverless</code>. Note that some operations (such as ExportLens and CreateLensShare) are not permitted on Amazon Web Services official lenses.</p>
122 /// <p>For custom lenses, this is the lens ARN, such as <code>arn:aws:wellarchitected:us-west-2:123456789012:lens/0123456789abcdef01234567890abcdef</code>.</p>
123 /// <p>Each lens is identified by its <code>LensSummary$LensAlias</code>.</p>
124 pub fn get_lens_alias(&self) -> &::std::option::Option<::std::string::String> {
125 &self.lens_alias
126 }
127 /// <p>The ARN for the lens.</p>
128 pub fn lens_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.lens_arn = ::std::option::Option::Some(input.into());
130 self
131 }
132 /// <p>The ARN for the lens.</p>
133 pub fn set_lens_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.lens_arn = input;
135 self
136 }
137 /// <p>The ARN for the lens.</p>
138 pub fn get_lens_arn(&self) -> &::std::option::Option<::std::string::String> {
139 &self.lens_arn
140 }
141 /// <p>An answer of the question.</p>
142 pub fn answer(mut self, input: crate::types::Answer) -> Self {
143 self.answer = ::std::option::Option::Some(input);
144 self
145 }
146 /// <p>An answer of the question.</p>
147 pub fn set_answer(mut self, input: ::std::option::Option<crate::types::Answer>) -> Self {
148 self.answer = input;
149 self
150 }
151 /// <p>An answer of the question.</p>
152 pub fn get_answer(&self) -> &::std::option::Option<crate::types::Answer> {
153 &self.answer
154 }
155 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
156 self._request_id = Some(request_id.into());
157 self
158 }
159
160 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
161 self._request_id = request_id;
162 self
163 }
164 /// Consumes the builder and constructs a [`GetAnswerOutput`](crate::operation::get_answer::GetAnswerOutput).
165 pub fn build(self) -> crate::operation::get_answer::GetAnswerOutput {
166 crate::operation::get_answer::GetAnswerOutput {
167 workload_id: self.workload_id,
168 milestone_number: self.milestone_number,
169 lens_alias: self.lens_alias,
170 lens_arn: self.lens_arn,
171 answer: self.answer,
172 _request_id: self._request_id,
173 }
174 }
175}