// 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 ListConformancePackComplianceScoresOutput {
    /// <p>The <code>nextToken</code> string that you can use to get the next page of results in a paginated response.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>A list of <code>ConformancePackComplianceScore</code> objects.</p>
    pub conformance_pack_compliance_scores: ::std::vec::Vec<crate::types::ConformancePackComplianceScore>,
    _request_id: Option<String>,
}
impl ListConformancePackComplianceScoresOutput {
    /// <p>The <code>nextToken</code> string that you can use to get the next page of results in a paginated response.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>A list of <code>ConformancePackComplianceScore</code> objects.</p>
    pub fn conformance_pack_compliance_scores(&self) -> &[crate::types::ConformancePackComplianceScore] {
        use std::ops::Deref;
        self.conformance_pack_compliance_scores.deref()
    }
}
impl ::aws_types::request_id::RequestId for ListConformancePackComplianceScoresOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListConformancePackComplianceScoresOutput {
    /// Creates a new builder-style object to manufacture [`ListConformancePackComplianceScoresOutput`](crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresOutput).
    pub fn builder() -> crate::operation::list_conformance_pack_compliance_scores::builders::ListConformancePackComplianceScoresOutputBuilder {
        crate::operation::list_conformance_pack_compliance_scores::builders::ListConformancePackComplianceScoresOutputBuilder::default()
    }
}

/// A builder for [`ListConformancePackComplianceScoresOutput`](crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListConformancePackComplianceScoresOutputBuilder {
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) conformance_pack_compliance_scores: ::std::option::Option<::std::vec::Vec<crate::types::ConformancePackComplianceScore>>,
    _request_id: Option<String>,
}
impl ListConformancePackComplianceScoresOutputBuilder {
    /// <p>The <code>nextToken</code> string that you can use to get the next page of results in a paginated response.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>nextToken</code> string that you can use to get the next page of results in a paginated response.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The <code>nextToken</code> string that you can use to get the next page of results in a paginated response.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Appends an item to `conformance_pack_compliance_scores`.
    ///
    /// To override the contents of this collection use [`set_conformance_pack_compliance_scores`](Self::set_conformance_pack_compliance_scores).
    ///
    /// <p>A list of <code>ConformancePackComplianceScore</code> objects.</p>
    pub fn conformance_pack_compliance_scores(mut self, input: crate::types::ConformancePackComplianceScore) -> Self {
        let mut v = self.conformance_pack_compliance_scores.unwrap_or_default();
        v.push(input);
        self.conformance_pack_compliance_scores = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of <code>ConformancePackComplianceScore</code> objects.</p>
    pub fn set_conformance_pack_compliance_scores(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::ConformancePackComplianceScore>>,
    ) -> Self {
        self.conformance_pack_compliance_scores = input;
        self
    }
    /// <p>A list of <code>ConformancePackComplianceScore</code> objects.</p>
    pub fn get_conformance_pack_compliance_scores(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConformancePackComplianceScore>> {
        &self.conformance_pack_compliance_scores
    }
    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 [`ListConformancePackComplianceScoresOutput`](crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`conformance_pack_compliance_scores`](crate::operation::list_conformance_pack_compliance_scores::builders::ListConformancePackComplianceScoresOutputBuilder::conformance_pack_compliance_scores)
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresOutput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(
            crate::operation::list_conformance_pack_compliance_scores::ListConformancePackComplianceScoresOutput {
                next_token: self.next_token
                ,
                conformance_pack_compliance_scores: self.conformance_pack_compliance_scores
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("conformance_pack_compliance_scores", "conformance_pack_compliance_scores was not specified but it is required when building ListConformancePackComplianceScoresOutput")
                    )?
                ,
                _request_id: self._request_id,
            }
        )
    }
}
