1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EnclaveOptions {
/// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
pub enabled: ::std::option::Option<bool>,
}
impl EnclaveOptions {
/// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
pub fn enabled(&self) -> ::std::option::Option<bool> {
self.enabled
}
}
impl EnclaveOptions {
/// Creates a new builder-style object to manufacture [`EnclaveOptions`](crate::types::EnclaveOptions).
pub fn builder() -> crate::types::builders::EnclaveOptionsBuilder {
crate::types::builders::EnclaveOptionsBuilder::default()
}
}
/// A builder for [`EnclaveOptions`](crate::types::EnclaveOptions).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct EnclaveOptionsBuilder {
pub(crate) enabled: ::std::option::Option<bool>,
}
impl EnclaveOptionsBuilder {
/// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = ::std::option::Option::Some(input);
self
}
/// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
/// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
pub fn get_enabled(&self) -> &::std::option::Option<bool> {
&self.enabled
}
/// Consumes the builder and constructs a [`EnclaveOptions`](crate::types::EnclaveOptions).
pub fn build(self) -> crate::types::EnclaveOptions {
crate::types::EnclaveOptions { enabled: self.enabled }
}
}