aws_sdk_wellarchitected/operation/update_answer/
_update_answer_output.rs

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