aws_sdk_migrationhubstrategy/operation/start_assessment/
_start_assessment_input.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 StartAssessmentInput {
6    /// <p>The S3 bucket used by the collectors to send analysis data to the service. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
7    pub s3bucket_for_analysis_data: ::std::option::Option<::std::string::String>,
8    /// <p>The S3 bucket where all the reports generated by the service are stored. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
9    pub s3bucket_for_report_data: ::std::option::Option<::std::string::String>,
10    /// <p>List of criteria for assessment.</p>
11    pub assessment_targets: ::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>>,
12    /// The data source type of an assessment to be started.
13    pub assessment_data_source_type: ::std::option::Option<crate::types::AssessmentDataSourceType>,
14}
15impl StartAssessmentInput {
16    /// <p>The S3 bucket used by the collectors to send analysis data to the service. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
17    pub fn s3bucket_for_analysis_data(&self) -> ::std::option::Option<&str> {
18        self.s3bucket_for_analysis_data.as_deref()
19    }
20    /// <p>The S3 bucket where all the reports generated by the service are stored. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
21    pub fn s3bucket_for_report_data(&self) -> ::std::option::Option<&str> {
22        self.s3bucket_for_report_data.as_deref()
23    }
24    /// <p>List of criteria for assessment.</p>
25    ///
26    /// 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()`.
27    pub fn assessment_targets(&self) -> &[crate::types::AssessmentTarget] {
28        self.assessment_targets.as_deref().unwrap_or_default()
29    }
30    /// The data source type of an assessment to be started.
31    pub fn assessment_data_source_type(&self) -> ::std::option::Option<&crate::types::AssessmentDataSourceType> {
32        self.assessment_data_source_type.as_ref()
33    }
34}
35impl StartAssessmentInput {
36    /// Creates a new builder-style object to manufacture [`StartAssessmentInput`](crate::operation::start_assessment::StartAssessmentInput).
37    pub fn builder() -> crate::operation::start_assessment::builders::StartAssessmentInputBuilder {
38        crate::operation::start_assessment::builders::StartAssessmentInputBuilder::default()
39    }
40}
41
42/// A builder for [`StartAssessmentInput`](crate::operation::start_assessment::StartAssessmentInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct StartAssessmentInputBuilder {
46    pub(crate) s3bucket_for_analysis_data: ::std::option::Option<::std::string::String>,
47    pub(crate) s3bucket_for_report_data: ::std::option::Option<::std::string::String>,
48    pub(crate) assessment_targets: ::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>>,
49    pub(crate) assessment_data_source_type: ::std::option::Option<crate::types::AssessmentDataSourceType>,
50}
51impl StartAssessmentInputBuilder {
52    /// <p>The S3 bucket used by the collectors to send analysis data to the service. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
53    pub fn s3bucket_for_analysis_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.s3bucket_for_analysis_data = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The S3 bucket used by the collectors to send analysis data to the service. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
58    pub fn set_s3bucket_for_analysis_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.s3bucket_for_analysis_data = input;
60        self
61    }
62    /// <p>The S3 bucket used by the collectors to send analysis data to the service. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
63    pub fn get_s3bucket_for_analysis_data(&self) -> &::std::option::Option<::std::string::String> {
64        &self.s3bucket_for_analysis_data
65    }
66    /// <p>The S3 bucket where all the reports generated by the service are stored. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
67    pub fn s3bucket_for_report_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.s3bucket_for_report_data = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The S3 bucket where all the reports generated by the service are stored. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
72    pub fn set_s3bucket_for_report_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.s3bucket_for_report_data = input;
74        self
75    }
76    /// <p>The S3 bucket where all the reports generated by the service are stored. The bucket name must begin with <code>migrationhub-strategy-</code>.</p>
77    pub fn get_s3bucket_for_report_data(&self) -> &::std::option::Option<::std::string::String> {
78        &self.s3bucket_for_report_data
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    /// The data source type of an assessment to be started.
101    pub fn assessment_data_source_type(mut self, input: crate::types::AssessmentDataSourceType) -> Self {
102        self.assessment_data_source_type = ::std::option::Option::Some(input);
103        self
104    }
105    /// The data source type of an assessment to be started.
106    pub fn set_assessment_data_source_type(mut self, input: ::std::option::Option<crate::types::AssessmentDataSourceType>) -> Self {
107        self.assessment_data_source_type = input;
108        self
109    }
110    /// The data source type of an assessment to be started.
111    pub fn get_assessment_data_source_type(&self) -> &::std::option::Option<crate::types::AssessmentDataSourceType> {
112        &self.assessment_data_source_type
113    }
114    /// Consumes the builder and constructs a [`StartAssessmentInput`](crate::operation::start_assessment::StartAssessmentInput).
115    pub fn build(
116        self,
117    ) -> ::std::result::Result<crate::operation::start_assessment::StartAssessmentInput, ::aws_smithy_types::error::operation::BuildError> {
118        ::std::result::Result::Ok(crate::operation::start_assessment::StartAssessmentInput {
119            s3bucket_for_analysis_data: self.s3bucket_for_analysis_data,
120            s3bucket_for_report_data: self.s3bucket_for_report_data,
121            assessment_targets: self.assessment_targets,
122            assessment_data_source_type: self.assessment_data_source_type,
123        })
124    }
125}