aws-sdk-amplifygen3 1.0.0

AWS SDK for AWS Amplify Gen 3
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 UpdateAccessControlOutput {
    /// <p>The status of the access control configuration.</p>
    pub status: crate::types::AccessControlStatus,
    /// <p>The reason for the status.</p>
    pub status_reason: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl UpdateAccessControlOutput {
    /// <p>The status of the access control configuration.</p>
    pub fn status(&self) -> &crate::types::AccessControlStatus {
        &self.status
    }
    /// <p>The reason for the status.</p>
    pub fn status_reason(&self) -> ::std::option::Option<&str> {
        self.status_reason.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateAccessControlOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateAccessControlOutput {
    /// Creates a new builder-style object to manufacture [`UpdateAccessControlOutput`](crate::operation::update_access_control::UpdateAccessControlOutput).
    pub fn builder() -> crate::operation::update_access_control::builders::UpdateAccessControlOutputBuilder {
        crate::operation::update_access_control::builders::UpdateAccessControlOutputBuilder::default()
    }
}

/// A builder for [`UpdateAccessControlOutput`](crate::operation::update_access_control::UpdateAccessControlOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAccessControlOutputBuilder {
    pub(crate) status: ::std::option::Option<crate::types::AccessControlStatus>,
    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl UpdateAccessControlOutputBuilder {
    /// <p>The status of the access control configuration.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::AccessControlStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the access control configuration.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::AccessControlStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the access control configuration.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::AccessControlStatus> {
        &self.status
    }
    /// <p>The reason for the status.</p>
    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason for the status.</p>
    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_reason = input;
        self
    }
    /// <p>The reason for the status.</p>
    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_reason
    }
    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 [`UpdateAccessControlOutput`](crate::operation::update_access_control::UpdateAccessControlOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`status`](crate::operation::update_access_control::builders::UpdateAccessControlOutputBuilder::status)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_access_control::UpdateAccessControlOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_access_control::UpdateAccessControlOutput {
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building UpdateAccessControlOutput",
                )
            })?,
            status_reason: self.status_reason,
            _request_id: self._request_id,
        })
    }
}