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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The accounting configuration includes configurable settings for Slurm accounting. It's a property of the <b>ClusterSlurmConfiguration</b> object.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Accounting {
/// <p>The default value for all purge settings for <code>slurmdbd.conf</code>. For more information, see the <a href="https://slurm.schedmd.com/slurmdbd.conf.html">slurmdbd.conf documentation at SchedMD</a>.</p>
/// <p>The default value for <code>defaultPurgeTimeInDays</code> is <code>-1</code>.</p>
/// <p>A value of <code>-1</code> means there is no purge time and records persist as long as the cluster exists.</p><important>
/// <p><code>0</code> isn't a valid value.</p>
/// </important>
pub default_purge_time_in_days: ::std::option::Option<i32>,
/// <p>The default value for <code>mode</code> is <code>NONE</code>. A value of <code>STANDARD</code> means Slurm accounting is enabled.</p>
pub mode: crate::types::AccountingMode,
}
impl Accounting {
/// <p>The default value for all purge settings for <code>slurmdbd.conf</code>. For more information, see the <a href="https://slurm.schedmd.com/slurmdbd.conf.html">slurmdbd.conf documentation at SchedMD</a>.</p>
/// <p>The default value for <code>defaultPurgeTimeInDays</code> is <code>-1</code>.</p>
/// <p>A value of <code>-1</code> means there is no purge time and records persist as long as the cluster exists.</p><important>
/// <p><code>0</code> isn't a valid value.</p>
/// </important>
pub fn default_purge_time_in_days(&self) -> ::std::option::Option<i32> {
self.default_purge_time_in_days
}
/// <p>The default value for <code>mode</code> is <code>NONE</code>. A value of <code>STANDARD</code> means Slurm accounting is enabled.</p>
pub fn mode(&self) -> &crate::types::AccountingMode {
&self.mode
}
}
impl Accounting {
/// Creates a new builder-style object to manufacture [`Accounting`](crate::types::Accounting).
pub fn builder() -> crate::types::builders::AccountingBuilder {
crate::types::builders::AccountingBuilder::default()
}
}
/// A builder for [`Accounting`](crate::types::Accounting).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AccountingBuilder {
pub(crate) default_purge_time_in_days: ::std::option::Option<i32>,
pub(crate) mode: ::std::option::Option<crate::types::AccountingMode>,
}
impl AccountingBuilder {
/// <p>The default value for all purge settings for <code>slurmdbd.conf</code>. For more information, see the <a href="https://slurm.schedmd.com/slurmdbd.conf.html">slurmdbd.conf documentation at SchedMD</a>.</p>
/// <p>The default value for <code>defaultPurgeTimeInDays</code> is <code>-1</code>.</p>
/// <p>A value of <code>-1</code> means there is no purge time and records persist as long as the cluster exists.</p><important>
/// <p><code>0</code> isn't a valid value.</p>
/// </important>
pub fn default_purge_time_in_days(mut self, input: i32) -> Self {
self.default_purge_time_in_days = ::std::option::Option::Some(input);
self
}
/// <p>The default value for all purge settings for <code>slurmdbd.conf</code>. For more information, see the <a href="https://slurm.schedmd.com/slurmdbd.conf.html">slurmdbd.conf documentation at SchedMD</a>.</p>
/// <p>The default value for <code>defaultPurgeTimeInDays</code> is <code>-1</code>.</p>
/// <p>A value of <code>-1</code> means there is no purge time and records persist as long as the cluster exists.</p><important>
/// <p><code>0</code> isn't a valid value.</p>
/// </important>
pub fn set_default_purge_time_in_days(mut self, input: ::std::option::Option<i32>) -> Self {
self.default_purge_time_in_days = input;
self
}
/// <p>The default value for all purge settings for <code>slurmdbd.conf</code>. For more information, see the <a href="https://slurm.schedmd.com/slurmdbd.conf.html">slurmdbd.conf documentation at SchedMD</a>.</p>
/// <p>The default value for <code>defaultPurgeTimeInDays</code> is <code>-1</code>.</p>
/// <p>A value of <code>-1</code> means there is no purge time and records persist as long as the cluster exists.</p><important>
/// <p><code>0</code> isn't a valid value.</p>
/// </important>
pub fn get_default_purge_time_in_days(&self) -> &::std::option::Option<i32> {
&self.default_purge_time_in_days
}
/// <p>The default value for <code>mode</code> is <code>NONE</code>. A value of <code>STANDARD</code> means Slurm accounting is enabled.</p>
/// This field is required.
pub fn mode(mut self, input: crate::types::AccountingMode) -> Self {
self.mode = ::std::option::Option::Some(input);
self
}
/// <p>The default value for <code>mode</code> is <code>NONE</code>. A value of <code>STANDARD</code> means Slurm accounting is enabled.</p>
pub fn set_mode(mut self, input: ::std::option::Option<crate::types::AccountingMode>) -> Self {
self.mode = input;
self
}
/// <p>The default value for <code>mode</code> is <code>NONE</code>. A value of <code>STANDARD</code> means Slurm accounting is enabled.</p>
pub fn get_mode(&self) -> &::std::option::Option<crate::types::AccountingMode> {
&self.mode
}
/// Consumes the builder and constructs a [`Accounting`](crate::types::Accounting).
/// This method will fail if any of the following fields are not set:
/// - [`mode`](crate::types::builders::AccountingBuilder::mode)
pub fn build(self) -> ::std::result::Result<crate::types::Accounting, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Accounting {
default_purge_time_in_days: self.default_purge_time_in_days,
mode: self.mode.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"mode",
"mode was not specified but it is required when building Accounting",
)
})?,
})
}
}