aws-sdk-migrationhubstrategy 1.78.0

AWS SDK for Migration Hub Strategy Recommendations
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartAssessmentInput {
    /// <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>
    pub s3bucket_for_analysis_data: ::std::option::Option<::std::string::String>,
    /// <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>
    pub s3bucket_for_report_data: ::std::option::Option<::std::string::String>,
    /// <p>List of criteria for assessment.</p>
    pub assessment_targets: ::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>>,
    /// The data source type of an assessment to be started.
    pub assessment_data_source_type: ::std::option::Option<crate::types::AssessmentDataSourceType>,
}
impl StartAssessmentInput {
    /// <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>
    pub fn s3bucket_for_analysis_data(&self) -> ::std::option::Option<&str> {
        self.s3bucket_for_analysis_data.as_deref()
    }
    /// <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>
    pub fn s3bucket_for_report_data(&self) -> ::std::option::Option<&str> {
        self.s3bucket_for_report_data.as_deref()
    }
    /// <p>List of criteria for assessment.</p>
    ///
    /// 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()`.
    pub fn assessment_targets(&self) -> &[crate::types::AssessmentTarget] {
        self.assessment_targets.as_deref().unwrap_or_default()
    }
    /// The data source type of an assessment to be started.
    pub fn assessment_data_source_type(&self) -> ::std::option::Option<&crate::types::AssessmentDataSourceType> {
        self.assessment_data_source_type.as_ref()
    }
}
impl StartAssessmentInput {
    /// Creates a new builder-style object to manufacture [`StartAssessmentInput`](crate::operation::start_assessment::StartAssessmentInput).
    pub fn builder() -> crate::operation::start_assessment::builders::StartAssessmentInputBuilder {
        crate::operation::start_assessment::builders::StartAssessmentInputBuilder::default()
    }
}

/// A builder for [`StartAssessmentInput`](crate::operation::start_assessment::StartAssessmentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartAssessmentInputBuilder {
    pub(crate) s3bucket_for_analysis_data: ::std::option::Option<::std::string::String>,
    pub(crate) s3bucket_for_report_data: ::std::option::Option<::std::string::String>,
    pub(crate) assessment_targets: ::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>>,
    pub(crate) assessment_data_source_type: ::std::option::Option<crate::types::AssessmentDataSourceType>,
}
impl StartAssessmentInputBuilder {
    /// <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>
    pub fn s3bucket_for_analysis_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3bucket_for_analysis_data = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_s3bucket_for_analysis_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3bucket_for_analysis_data = input;
        self
    }
    /// <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>
    pub fn get_s3bucket_for_analysis_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3bucket_for_analysis_data
    }
    /// <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>
    pub fn s3bucket_for_report_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3bucket_for_report_data = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_s3bucket_for_report_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3bucket_for_report_data = input;
        self
    }
    /// <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>
    pub fn get_s3bucket_for_report_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3bucket_for_report_data
    }
    /// Appends an item to `assessment_targets`.
    ///
    /// To override the contents of this collection use [`set_assessment_targets`](Self::set_assessment_targets).
    ///
    /// <p>List of criteria for assessment.</p>
    pub fn assessment_targets(mut self, input: crate::types::AssessmentTarget) -> Self {
        let mut v = self.assessment_targets.unwrap_or_default();
        v.push(input);
        self.assessment_targets = ::std::option::Option::Some(v);
        self
    }
    /// <p>List of criteria for assessment.</p>
    pub fn set_assessment_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>>) -> Self {
        self.assessment_targets = input;
        self
    }
    /// <p>List of criteria for assessment.</p>
    pub fn get_assessment_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssessmentTarget>> {
        &self.assessment_targets
    }
    /// The data source type of an assessment to be started.
    pub fn assessment_data_source_type(mut self, input: crate::types::AssessmentDataSourceType) -> Self {
        self.assessment_data_source_type = ::std::option::Option::Some(input);
        self
    }
    /// The data source type of an assessment to be started.
    pub fn set_assessment_data_source_type(mut self, input: ::std::option::Option<crate::types::AssessmentDataSourceType>) -> Self {
        self.assessment_data_source_type = input;
        self
    }
    /// The data source type of an assessment to be started.
    pub fn get_assessment_data_source_type(&self) -> &::std::option::Option<crate::types::AssessmentDataSourceType> {
        &self.assessment_data_source_type
    }
    /// Consumes the builder and constructs a [`StartAssessmentInput`](crate::operation::start_assessment::StartAssessmentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_assessment::StartAssessmentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::start_assessment::StartAssessmentInput {
            s3bucket_for_analysis_data: self.s3bucket_for_analysis_data,
            s3bucket_for_report_data: self.s3bucket_for_report_data,
            assessment_targets: self.assessment_targets,
            assessment_data_source_type: self.assessment_data_source_type,
        })
    }
}