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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The cluster management and job scheduling software associated with the cluster.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Scheduler {
/// <p>The software PCS uses to manage cluster scaling and job scheduling.</p>
pub r#type: crate::types::SchedulerType,
/// <p>The version of the specified scheduling software that PCS uses to manage cluster scaling and job scheduling. For more information, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/slurm-versions.html">Slurm versions in PCS</a> in the <i>PCS User Guide</i>.</p>
/// <p>Valid Values: <code>23.11 | 24.05 | 24.11 | 25.05 | 25.11</code></p>
pub version: ::std::string::String,
}
impl Scheduler {
/// <p>The software PCS uses to manage cluster scaling and job scheduling.</p>
pub fn r#type(&self) -> &crate::types::SchedulerType {
&self.r#type
}
/// <p>The version of the specified scheduling software that PCS uses to manage cluster scaling and job scheduling. For more information, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/slurm-versions.html">Slurm versions in PCS</a> in the <i>PCS User Guide</i>.</p>
/// <p>Valid Values: <code>23.11 | 24.05 | 24.11 | 25.05 | 25.11</code></p>
pub fn version(&self) -> &str {
use std::ops::Deref;
self.version.deref()
}
}
impl Scheduler {
/// Creates a new builder-style object to manufacture [`Scheduler`](crate::types::Scheduler).
pub fn builder() -> crate::types::builders::SchedulerBuilder {
crate::types::builders::SchedulerBuilder::default()
}
}
/// A builder for [`Scheduler`](crate::types::Scheduler).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SchedulerBuilder {
pub(crate) r#type: ::std::option::Option<crate::types::SchedulerType>,
pub(crate) version: ::std::option::Option<::std::string::String>,
}
impl SchedulerBuilder {
/// <p>The software PCS uses to manage cluster scaling and job scheduling.</p>
/// This field is required.
pub fn r#type(mut self, input: crate::types::SchedulerType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The software PCS uses to manage cluster scaling and job scheduling.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::SchedulerType>) -> Self {
self.r#type = input;
self
}
/// <p>The software PCS uses to manage cluster scaling and job scheduling.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::SchedulerType> {
&self.r#type
}
/// <p>The version of the specified scheduling software that PCS uses to manage cluster scaling and job scheduling. For more information, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/slurm-versions.html">Slurm versions in PCS</a> in the <i>PCS User Guide</i>.</p>
/// <p>Valid Values: <code>23.11 | 24.05 | 24.11 | 25.05 | 25.11</code></p>
/// This field is required.
pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version = ::std::option::Option::Some(input.into());
self
}
/// <p>The version of the specified scheduling software that PCS uses to manage cluster scaling and job scheduling. For more information, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/slurm-versions.html">Slurm versions in PCS</a> in the <i>PCS User Guide</i>.</p>
/// <p>Valid Values: <code>23.11 | 24.05 | 24.11 | 25.05 | 25.11</code></p>
pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version = input;
self
}
/// <p>The version of the specified scheduling software that PCS uses to manage cluster scaling and job scheduling. For more information, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/slurm-versions.html">Slurm versions in PCS</a> in the <i>PCS User Guide</i>.</p>
/// <p>Valid Values: <code>23.11 | 24.05 | 24.11 | 25.05 | 25.11</code></p>
pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
&self.version
}
/// Consumes the builder and constructs a [`Scheduler`](crate::types::Scheduler).
/// This method will fail if any of the following fields are not set:
/// - [`r#type`](crate::types::builders::SchedulerBuilder::type)
/// - [`version`](crate::types::builders::SchedulerBuilder::version)
pub fn build(self) -> ::std::result::Result<crate::types::Scheduler, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Scheduler {
r#type: self.r#type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"r#type",
"r#type was not specified but it is required when building Scheduler",
)
})?,
version: self.version.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"version",
"version was not specified but it is required when building Scheduler",
)
})?,
})
}
}