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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes an application's checkpointing configuration. Checkpointing is the process of persisting application state for fault tolerance. For more information, see <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/concepts/programming-model.html#checkpoints-for-fault-tolerance"> Checkpoints for Fault Tolerance</a> in the <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/">Apache Flink Documentation</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CheckpointConfiguration {
    /// <p>Describes whether the application uses Kinesis Data Analytics' default checkpointing behavior. You must set this property to <code>CUSTOM</code> in order to set the <code>CheckpointingEnabled</code>, <code>CheckpointInterval</code>, or <code>MinPauseBetweenCheckpoints</code> parameters.</p> <note>
    /// <p>If this value is set to <code>DEFAULT</code>, the application will use the following values, even if they are set to other values using APIs or application code:</p>
    /// <ul>
    /// <li> <p> <b>CheckpointingEnabled:</b> true</p> </li>
    /// <li> <p> <b>CheckpointInterval:</b> 60000</p> </li>
    /// <li> <p> <b>MinPauseBetweenCheckpoints:</b> 5000</p> </li>
    /// </ul>
    /// </note>
    pub configuration_type: ::std::option::Option<crate::types::ConfigurationType>,
    /// <p>Describes whether checkpointing is enabled for a Flink-based Kinesis Data Analytics application.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointingEnabled</code> value of <code>true</code>, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub checkpointing_enabled: ::std::option::Option<bool>,
    /// <p>Describes the interval in milliseconds between checkpoint operations. </p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointInterval</code> value of 60000, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub checkpoint_interval: ::std::option::Option<i64>,
    /// <p>Describes the minimum time in milliseconds after a checkpoint operation completes that a new checkpoint operation can start. If a checkpoint operation takes longer than the <code>CheckpointInterval</code>, the application otherwise performs continual checkpoint operations. For more information, see <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/ops/state/large_state_tuning.html#tuning-checkpointing"> Tuning Checkpointing</a> in the <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/">Apache Flink Documentation</a>.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>MinPauseBetweenCheckpoints</code> value of 5000, even if this value is set using this API or in application code.</p>
    /// </note>
    pub min_pause_between_checkpoints: ::std::option::Option<i64>,
}
impl CheckpointConfiguration {
    /// <p>Describes whether the application uses Kinesis Data Analytics' default checkpointing behavior. You must set this property to <code>CUSTOM</code> in order to set the <code>CheckpointingEnabled</code>, <code>CheckpointInterval</code>, or <code>MinPauseBetweenCheckpoints</code> parameters.</p> <note>
    /// <p>If this value is set to <code>DEFAULT</code>, the application will use the following values, even if they are set to other values using APIs or application code:</p>
    /// <ul>
    /// <li> <p> <b>CheckpointingEnabled:</b> true</p> </li>
    /// <li> <p> <b>CheckpointInterval:</b> 60000</p> </li>
    /// <li> <p> <b>MinPauseBetweenCheckpoints:</b> 5000</p> </li>
    /// </ul>
    /// </note>
    pub fn configuration_type(&self) -> ::std::option::Option<&crate::types::ConfigurationType> {
        self.configuration_type.as_ref()
    }
    /// <p>Describes whether checkpointing is enabled for a Flink-based Kinesis Data Analytics application.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointingEnabled</code> value of <code>true</code>, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub fn checkpointing_enabled(&self) -> ::std::option::Option<bool> {
        self.checkpointing_enabled
    }
    /// <p>Describes the interval in milliseconds between checkpoint operations. </p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointInterval</code> value of 60000, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub fn checkpoint_interval(&self) -> ::std::option::Option<i64> {
        self.checkpoint_interval
    }
    /// <p>Describes the minimum time in milliseconds after a checkpoint operation completes that a new checkpoint operation can start. If a checkpoint operation takes longer than the <code>CheckpointInterval</code>, the application otherwise performs continual checkpoint operations. For more information, see <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/ops/state/large_state_tuning.html#tuning-checkpointing"> Tuning Checkpointing</a> in the <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/">Apache Flink Documentation</a>.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>MinPauseBetweenCheckpoints</code> value of 5000, even if this value is set using this API or in application code.</p>
    /// </note>
    pub fn min_pause_between_checkpoints(&self) -> ::std::option::Option<i64> {
        self.min_pause_between_checkpoints
    }
}
impl CheckpointConfiguration {
    /// Creates a new builder-style object to manufacture [`CheckpointConfiguration`](crate::types::CheckpointConfiguration).
    pub fn builder() -> crate::types::builders::CheckpointConfigurationBuilder {
        crate::types::builders::CheckpointConfigurationBuilder::default()
    }
}

/// A builder for [`CheckpointConfiguration`](crate::types::CheckpointConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CheckpointConfigurationBuilder {
    pub(crate) configuration_type: ::std::option::Option<crate::types::ConfigurationType>,
    pub(crate) checkpointing_enabled: ::std::option::Option<bool>,
    pub(crate) checkpoint_interval: ::std::option::Option<i64>,
    pub(crate) min_pause_between_checkpoints: ::std::option::Option<i64>,
}
impl CheckpointConfigurationBuilder {
    /// <p>Describes whether the application uses Kinesis Data Analytics' default checkpointing behavior. You must set this property to <code>CUSTOM</code> in order to set the <code>CheckpointingEnabled</code>, <code>CheckpointInterval</code>, or <code>MinPauseBetweenCheckpoints</code> parameters.</p> <note>
    /// <p>If this value is set to <code>DEFAULT</code>, the application will use the following values, even if they are set to other values using APIs or application code:</p>
    /// <ul>
    /// <li> <p> <b>CheckpointingEnabled:</b> true</p> </li>
    /// <li> <p> <b>CheckpointInterval:</b> 60000</p> </li>
    /// <li> <p> <b>MinPauseBetweenCheckpoints:</b> 5000</p> </li>
    /// </ul>
    /// </note>
    pub fn configuration_type(mut self, input: crate::types::ConfigurationType) -> Self {
        self.configuration_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Describes whether the application uses Kinesis Data Analytics' default checkpointing behavior. You must set this property to <code>CUSTOM</code> in order to set the <code>CheckpointingEnabled</code>, <code>CheckpointInterval</code>, or <code>MinPauseBetweenCheckpoints</code> parameters.</p> <note>
    /// <p>If this value is set to <code>DEFAULT</code>, the application will use the following values, even if they are set to other values using APIs or application code:</p>
    /// <ul>
    /// <li> <p> <b>CheckpointingEnabled:</b> true</p> </li>
    /// <li> <p> <b>CheckpointInterval:</b> 60000</p> </li>
    /// <li> <p> <b>MinPauseBetweenCheckpoints:</b> 5000</p> </li>
    /// </ul>
    /// </note>
    pub fn set_configuration_type(mut self, input: ::std::option::Option<crate::types::ConfigurationType>) -> Self {
        self.configuration_type = input;
        self
    }
    /// <p>Describes whether the application uses Kinesis Data Analytics' default checkpointing behavior. You must set this property to <code>CUSTOM</code> in order to set the <code>CheckpointingEnabled</code>, <code>CheckpointInterval</code>, or <code>MinPauseBetweenCheckpoints</code> parameters.</p> <note>
    /// <p>If this value is set to <code>DEFAULT</code>, the application will use the following values, even if they are set to other values using APIs or application code:</p>
    /// <ul>
    /// <li> <p> <b>CheckpointingEnabled:</b> true</p> </li>
    /// <li> <p> <b>CheckpointInterval:</b> 60000</p> </li>
    /// <li> <p> <b>MinPauseBetweenCheckpoints:</b> 5000</p> </li>
    /// </ul>
    /// </note>
    pub fn get_configuration_type(&self) -> &::std::option::Option<crate::types::ConfigurationType> {
        &self.configuration_type
    }
    /// <p>Describes whether checkpointing is enabled for a Flink-based Kinesis Data Analytics application.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointingEnabled</code> value of <code>true</code>, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub fn checkpointing_enabled(mut self, input: bool) -> Self {
        self.checkpointing_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Describes whether checkpointing is enabled for a Flink-based Kinesis Data Analytics application.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointingEnabled</code> value of <code>true</code>, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub fn set_checkpointing_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.checkpointing_enabled = input;
        self
    }
    /// <p>Describes whether checkpointing is enabled for a Flink-based Kinesis Data Analytics application.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointingEnabled</code> value of <code>true</code>, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub fn get_checkpointing_enabled(&self) -> &::std::option::Option<bool> {
        &self.checkpointing_enabled
    }
    /// <p>Describes the interval in milliseconds between checkpoint operations. </p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointInterval</code> value of 60000, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub fn checkpoint_interval(mut self, input: i64) -> Self {
        self.checkpoint_interval = ::std::option::Option::Some(input);
        self
    }
    /// <p>Describes the interval in milliseconds between checkpoint operations. </p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointInterval</code> value of 60000, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub fn set_checkpoint_interval(mut self, input: ::std::option::Option<i64>) -> Self {
        self.checkpoint_interval = input;
        self
    }
    /// <p>Describes the interval in milliseconds between checkpoint operations. </p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>CheckpointInterval</code> value of 60000, even if this value is set to another value using this API or in application code.</p>
    /// </note>
    pub fn get_checkpoint_interval(&self) -> &::std::option::Option<i64> {
        &self.checkpoint_interval
    }
    /// <p>Describes the minimum time in milliseconds after a checkpoint operation completes that a new checkpoint operation can start. If a checkpoint operation takes longer than the <code>CheckpointInterval</code>, the application otherwise performs continual checkpoint operations. For more information, see <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/ops/state/large_state_tuning.html#tuning-checkpointing"> Tuning Checkpointing</a> in the <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/">Apache Flink Documentation</a>.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>MinPauseBetweenCheckpoints</code> value of 5000, even if this value is set using this API or in application code.</p>
    /// </note>
    pub fn min_pause_between_checkpoints(mut self, input: i64) -> Self {
        self.min_pause_between_checkpoints = ::std::option::Option::Some(input);
        self
    }
    /// <p>Describes the minimum time in milliseconds after a checkpoint operation completes that a new checkpoint operation can start. If a checkpoint operation takes longer than the <code>CheckpointInterval</code>, the application otherwise performs continual checkpoint operations. For more information, see <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/ops/state/large_state_tuning.html#tuning-checkpointing"> Tuning Checkpointing</a> in the <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/">Apache Flink Documentation</a>.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>MinPauseBetweenCheckpoints</code> value of 5000, even if this value is set using this API or in application code.</p>
    /// </note>
    pub fn set_min_pause_between_checkpoints(mut self, input: ::std::option::Option<i64>) -> Self {
        self.min_pause_between_checkpoints = input;
        self
    }
    /// <p>Describes the minimum time in milliseconds after a checkpoint operation completes that a new checkpoint operation can start. If a checkpoint operation takes longer than the <code>CheckpointInterval</code>, the application otherwise performs continual checkpoint operations. For more information, see <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/ops/state/large_state_tuning.html#tuning-checkpointing"> Tuning Checkpointing</a> in the <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.8/">Apache Flink Documentation</a>.</p> <note>
    /// <p>If <code>CheckpointConfiguration.ConfigurationType</code> is <code>DEFAULT</code>, the application will use a <code>MinPauseBetweenCheckpoints</code> value of 5000, even if this value is set using this API or in application code.</p>
    /// </note>
    pub fn get_min_pause_between_checkpoints(&self) -> &::std::option::Option<i64> {
        &self.min_pause_between_checkpoints
    }
    /// Consumes the builder and constructs a [`CheckpointConfiguration`](crate::types::CheckpointConfiguration).
    pub fn build(self) -> crate::types::CheckpointConfiguration {
        crate::types::CheckpointConfiguration {
            configuration_type: self.configuration_type,
            checkpointing_enabled: self.checkpointing_enabled,
            checkpoint_interval: self.checkpoint_interval,
            min_pause_between_checkpoints: self.min_pause_between_checkpoints,
        }
    }
}