aws_sdk_migrationhubstrategy/operation/get_assessment/
_get_assessment_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetAssessmentOutput {
6    /// <p>The ID for the specific assessment task.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>Detailed information about the assessment.</p>
9    pub data_collection_details: ::std::option::Option<crate::types::DataCollectionDetails>,
10    /// <p>List of criteria for assessment.</p>
11    pub assessment_targets: ::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>>,
12    _request_id: Option<String>,
13}
14impl GetAssessmentOutput {
15    /// <p>The ID for the specific assessment task.</p>
16    pub fn id(&self) -> ::std::option::Option<&str> {
17        self.id.as_deref()
18    }
19    /// <p>Detailed information about the assessment.</p>
20    pub fn data_collection_details(&self) -> ::std::option::Option<&crate::types::DataCollectionDetails> {
21        self.data_collection_details.as_ref()
22    }
23    /// <p>List of criteria for assessment.</p>
24    ///
25    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.assessment_targets.is_none()`.
26    pub fn assessment_targets(&self) -> &[crate::types::AssessmentTarget] {
27        self.assessment_targets.as_deref().unwrap_or_default()
28    }
29}
30impl ::aws_types::request_id::RequestId for GetAssessmentOutput {
31    fn request_id(&self) -> Option<&str> {
32        self._request_id.as_deref()
33    }
34}
35impl GetAssessmentOutput {
36    /// Creates a new builder-style object to manufacture [`GetAssessmentOutput`](crate::operation::get_assessment::GetAssessmentOutput).
37    pub fn builder() -> crate::operation::get_assessment::builders::GetAssessmentOutputBuilder {
38        crate::operation::get_assessment::builders::GetAssessmentOutputBuilder::default()
39    }
40}
41
42/// A builder for [`GetAssessmentOutput`](crate::operation::get_assessment::GetAssessmentOutput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct GetAssessmentOutputBuilder {
46    pub(crate) id: ::std::option::Option<::std::string::String>,
47    pub(crate) data_collection_details: ::std::option::Option<crate::types::DataCollectionDetails>,
48    pub(crate) assessment_targets: ::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>>,
49    _request_id: Option<String>,
50}
51impl GetAssessmentOutputBuilder {
52    /// <p>The ID for the specific assessment task.</p>
53    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The ID for the specific assessment task.</p>
58    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.id = input;
60        self
61    }
62    /// <p>The ID for the specific assessment task.</p>
63    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.id
65    }
66    /// <p>Detailed information about the assessment.</p>
67    pub fn data_collection_details(mut self, input: crate::types::DataCollectionDetails) -> Self {
68        self.data_collection_details = ::std::option::Option::Some(input);
69        self
70    }
71    /// <p>Detailed information about the assessment.</p>
72    pub fn set_data_collection_details(mut self, input: ::std::option::Option<crate::types::DataCollectionDetails>) -> Self {
73        self.data_collection_details = input;
74        self
75    }
76    /// <p>Detailed information about the assessment.</p>
77    pub fn get_data_collection_details(&self) -> &::std::option::Option<crate::types::DataCollectionDetails> {
78        &self.data_collection_details
79    }
80    /// Appends an item to `assessment_targets`.
81    ///
82    /// To override the contents of this collection use [`set_assessment_targets`](Self::set_assessment_targets).
83    ///
84    /// <p>List of criteria for assessment.</p>
85    pub fn assessment_targets(mut self, input: crate::types::AssessmentTarget) -> Self {
86        let mut v = self.assessment_targets.unwrap_or_default();
87        v.push(input);
88        self.assessment_targets = ::std::option::Option::Some(v);
89        self
90    }
91    /// <p>List of criteria for assessment.</p>
92    pub fn set_assessment_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>>) -> Self {
93        self.assessment_targets = input;
94        self
95    }
96    /// <p>List of criteria for assessment.</p>
97    pub fn get_assessment_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>> {
98        &self.assessment_targets
99    }
100    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
101        self._request_id = Some(request_id.into());
102        self
103    }
104
105    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
106        self._request_id = request_id;
107        self
108    }
109    /// Consumes the builder and constructs a [`GetAssessmentOutput`](crate::operation::get_assessment::GetAssessmentOutput).
110    pub fn build(self) -> crate::operation::get_assessment::GetAssessmentOutput {
111        crate::operation::get_assessment::GetAssessmentOutput {
112            id: self.id,
113            data_collection_details: self.data_collection_details,
114            assessment_targets: self.assessment_targets,
115            _request_id: self._request_id,
116        }
117    }
118}