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
49
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Enable custom Time to Live (TTL) settings for rows and columns without setting a TTL default for the specified table.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_enabling">Enabling TTL on tables</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TimeToLive {
    /// <p>Shows how to enable custom Time to Live (TTL) settings for the specified table.</p>
    pub status: ::std::option::Option<crate::types::TimeToLiveStatus>,
}
impl TimeToLive {
    /// <p>Shows how to enable custom Time to Live (TTL) settings for the specified table.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::TimeToLiveStatus> {
        self.status.as_ref()
    }
}
impl TimeToLive {
    /// Creates a new builder-style object to manufacture [`TimeToLive`](crate::types::TimeToLive).
    pub fn builder() -> crate::types::builders::TimeToLiveBuilder {
        crate::types::builders::TimeToLiveBuilder::default()
    }
}

/// A builder for [`TimeToLive`](crate::types::TimeToLive).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TimeToLiveBuilder {
    pub(crate) status: ::std::option::Option<crate::types::TimeToLiveStatus>,
}
impl TimeToLiveBuilder {
    /// <p>Shows how to enable custom Time to Live (TTL) settings for the specified table.</p>
    pub fn status(mut self, input: crate::types::TimeToLiveStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Shows how to enable custom Time to Live (TTL) settings for the specified table.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::TimeToLiveStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Shows how to enable custom Time to Live (TTL) settings for the specified table.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::TimeToLiveStatus> {
        &self.status
    }
    /// Consumes the builder and constructs a [`TimeToLive`](crate::types::TimeToLive).
    pub fn build(self) -> crate::types::TimeToLive {
        crate::types::TimeToLive { status: self.status }
    }
}