// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A legal hold configuration for an object.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ObjectLockLegalHold {
    /// <p>Indicates whether the specified object has a legal hold in place.</p>
    pub status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
}
impl ObjectLockLegalHold {
    /// <p>Indicates whether the specified object has a legal hold in place.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ObjectLockLegalHoldStatus> {
        self.status.as_ref()
    }
}
impl ObjectLockLegalHold {
    /// Creates a new builder-style object to manufacture [`ObjectLockLegalHold`](crate::types::ObjectLockLegalHold).
    pub fn builder() -> crate::types::builders::ObjectLockLegalHoldBuilder {
        crate::types::builders::ObjectLockLegalHoldBuilder::default()
    }
}

/// A builder for [`ObjectLockLegalHold`](crate::types::ObjectLockLegalHold).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ObjectLockLegalHoldBuilder {
    pub(crate) status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
}
impl ObjectLockLegalHoldBuilder {
    /// <p>Indicates whether the specified object has a legal hold in place.</p>
    pub fn status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the specified object has a legal hold in place.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Indicates whether the specified object has a legal hold in place.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
        &self.status
    }
    /// Consumes the builder and constructs a [`ObjectLockLegalHold`](crate::types::ObjectLockLegalHold).
    pub fn build(self) -> crate::types::ObjectLockLegalHold {
        crate::types::ObjectLockLegalHold { status: self.status }
    }
}
