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

/// <p>Specifies the maximum number of training jobs and parallel training jobs that a hyperparameter tuning job can launch.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ResourceLimits {
    /// <p>The maximum number of training jobs that a hyperparameter tuning job can launch.</p>
    pub max_number_of_training_jobs: ::std::option::Option<i32>,
    /// <p>The maximum number of concurrent training jobs that a hyperparameter tuning job can launch.</p>
    pub max_parallel_training_jobs: ::std::option::Option<i32>,
    /// <p>The maximum time in seconds that a hyperparameter tuning job can run.</p>
    pub max_runtime_in_seconds: ::std::option::Option<i32>,
}
impl ResourceLimits {
    /// <p>The maximum number of training jobs that a hyperparameter tuning job can launch.</p>
    pub fn max_number_of_training_jobs(&self) -> ::std::option::Option<i32> {
        self.max_number_of_training_jobs
    }
    /// <p>The maximum number of concurrent training jobs that a hyperparameter tuning job can launch.</p>
    pub fn max_parallel_training_jobs(&self) -> ::std::option::Option<i32> {
        self.max_parallel_training_jobs
    }
    /// <p>The maximum time in seconds that a hyperparameter tuning job can run.</p>
    pub fn max_runtime_in_seconds(&self) -> ::std::option::Option<i32> {
        self.max_runtime_in_seconds
    }
}
impl ResourceLimits {
    /// Creates a new builder-style object to manufacture [`ResourceLimits`](crate::types::ResourceLimits).
    pub fn builder() -> crate::types::builders::ResourceLimitsBuilder {
        crate::types::builders::ResourceLimitsBuilder::default()
    }
}

/// A builder for [`ResourceLimits`](crate::types::ResourceLimits).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ResourceLimitsBuilder {
    pub(crate) max_number_of_training_jobs: ::std::option::Option<i32>,
    pub(crate) max_parallel_training_jobs: ::std::option::Option<i32>,
    pub(crate) max_runtime_in_seconds: ::std::option::Option<i32>,
}
impl ResourceLimitsBuilder {
    /// <p>The maximum number of training jobs that a hyperparameter tuning job can launch.</p>
    pub fn max_number_of_training_jobs(mut self, input: i32) -> Self {
        self.max_number_of_training_jobs = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of training jobs that a hyperparameter tuning job can launch.</p>
    pub fn set_max_number_of_training_jobs(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_number_of_training_jobs = input;
        self
    }
    /// <p>The maximum number of training jobs that a hyperparameter tuning job can launch.</p>
    pub fn get_max_number_of_training_jobs(&self) -> &::std::option::Option<i32> {
        &self.max_number_of_training_jobs
    }
    /// <p>The maximum number of concurrent training jobs that a hyperparameter tuning job can launch.</p>
    /// This field is required.
    pub fn max_parallel_training_jobs(mut self, input: i32) -> Self {
        self.max_parallel_training_jobs = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of concurrent training jobs that a hyperparameter tuning job can launch.</p>
    pub fn set_max_parallel_training_jobs(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_parallel_training_jobs = input;
        self
    }
    /// <p>The maximum number of concurrent training jobs that a hyperparameter tuning job can launch.</p>
    pub fn get_max_parallel_training_jobs(&self) -> &::std::option::Option<i32> {
        &self.max_parallel_training_jobs
    }
    /// <p>The maximum time in seconds that a hyperparameter tuning job can run.</p>
    pub fn max_runtime_in_seconds(mut self, input: i32) -> Self {
        self.max_runtime_in_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum time in seconds that a hyperparameter tuning job can run.</p>
    pub fn set_max_runtime_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_runtime_in_seconds = input;
        self
    }
    /// <p>The maximum time in seconds that a hyperparameter tuning job can run.</p>
    pub fn get_max_runtime_in_seconds(&self) -> &::std::option::Option<i32> {
        &self.max_runtime_in_seconds
    }
    /// Consumes the builder and constructs a [`ResourceLimits`](crate::types::ResourceLimits).
    pub fn build(self) -> crate::types::ResourceLimits {
        crate::types::ResourceLimits {
            max_number_of_training_jobs: self.max_number_of_training_jobs,
            max_parallel_training_jobs: self.max_parallel_training_jobs,
            max_runtime_in_seconds: self.max_runtime_in_seconds,
        }
    }
}