aws-sdk-migrationhubstrategy 0.27.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 GetAssessmentOutput {
    /// <p> The ID for the specific assessment task. </p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p> Detailed information about the assessment. </p>
    #[doc(hidden)]
    pub data_collection_details: std::option::Option<crate::types::DataCollectionDetails>,
    /// <p>List of criteria for assessment.</p>
    #[doc(hidden)]
    pub assessment_targets: std::option::Option<std::vec::Vec<crate::types::AssessmentTarget>>,
    _request_id: Option<String>,
}
impl GetAssessmentOutput {
    /// <p> The ID for the specific assessment task. </p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p> Detailed information about the assessment. </p>
    pub fn data_collection_details(
        &self,
    ) -> std::option::Option<&crate::types::DataCollectionDetails> {
        self.data_collection_details.as_ref()
    }
    /// <p>List of criteria for assessment.</p>
    pub fn assessment_targets(&self) -> std::option::Option<&[crate::types::AssessmentTarget]> {
        self.assessment_targets.as_deref()
    }
}
impl aws_http::request_id::RequestId for GetAssessmentOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetAssessmentOutput {
    /// Creates a new builder-style object to manufacture [`GetAssessmentOutput`](crate::operation::get_assessment::GetAssessmentOutput).
    pub fn builder() -> crate::operation::get_assessment::builders::GetAssessmentOutputBuilder {
        crate::operation::get_assessment::builders::GetAssessmentOutputBuilder::default()
    }
}

/// A builder for [`GetAssessmentOutput`](crate::operation::get_assessment::GetAssessmentOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GetAssessmentOutputBuilder {
    pub(crate) id: std::option::Option<std::string::String>,
    pub(crate) data_collection_details: std::option::Option<crate::types::DataCollectionDetails>,
    pub(crate) assessment_targets:
        std::option::Option<std::vec::Vec<crate::types::AssessmentTarget>>,
    _request_id: Option<String>,
}
impl GetAssessmentOutputBuilder {
    /// <p> The ID for the specific assessment task. </p>
    pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
        self.id = Some(input.into());
        self
    }
    /// <p> The ID for the specific assessment task. </p>
    pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p> Detailed information about the assessment. </p>
    pub fn data_collection_details(mut self, input: crate::types::DataCollectionDetails) -> Self {
        self.data_collection_details = Some(input);
        self
    }
    /// <p> Detailed information about the assessment. </p>
    pub fn set_data_collection_details(
        mut self,
        input: std::option::Option<crate::types::DataCollectionDetails>,
    ) -> Self {
        self.data_collection_details = input;
        self
    }
    /// 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 = 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
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetAssessmentOutput`](crate::operation::get_assessment::GetAssessmentOutput).
    pub fn build(self) -> crate::operation::get_assessment::GetAssessmentOutput {
        crate::operation::get_assessment::GetAssessmentOutput {
            id: self.id,
            data_collection_details: self.data_collection_details,
            assessment_targets: self.assessment_targets,
            _request_id: self._request_id,
        }
    }
}