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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Defines the traffic pattern.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Phase {
/// <p>Specifies how many concurrent users to start with. The value should be between 1 and 3.</p>
pub initial_number_of_users: ::std::option::Option<i32>,
/// <p>Specified how many new users to spawn in a minute.</p>
pub spawn_rate: ::std::option::Option<i32>,
/// <p>Specifies how long a traffic phase should be. For custom load tests, the value should be between 120 and 3600. This value should not exceed <code>JobDurationInSeconds</code>.</p>
pub duration_in_seconds: ::std::option::Option<i32>,
}
impl Phase {
/// <p>Specifies how many concurrent users to start with. The value should be between 1 and 3.</p>
pub fn initial_number_of_users(&self) -> ::std::option::Option<i32> {
self.initial_number_of_users
}
/// <p>Specified how many new users to spawn in a minute.</p>
pub fn spawn_rate(&self) -> ::std::option::Option<i32> {
self.spawn_rate
}
/// <p>Specifies how long a traffic phase should be. For custom load tests, the value should be between 120 and 3600. This value should not exceed <code>JobDurationInSeconds</code>.</p>
pub fn duration_in_seconds(&self) -> ::std::option::Option<i32> {
self.duration_in_seconds
}
}
impl Phase {
/// Creates a new builder-style object to manufacture [`Phase`](crate::types::Phase).
pub fn builder() -> crate::types::builders::PhaseBuilder {
crate::types::builders::PhaseBuilder::default()
}
}
/// A builder for [`Phase`](crate::types::Phase).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PhaseBuilder {
pub(crate) initial_number_of_users: ::std::option::Option<i32>,
pub(crate) spawn_rate: ::std::option::Option<i32>,
pub(crate) duration_in_seconds: ::std::option::Option<i32>,
}
impl PhaseBuilder {
/// <p>Specifies how many concurrent users to start with. The value should be between 1 and 3.</p>
pub fn initial_number_of_users(mut self, input: i32) -> Self {
self.initial_number_of_users = ::std::option::Option::Some(input);
self
}
/// <p>Specifies how many concurrent users to start with. The value should be between 1 and 3.</p>
pub fn set_initial_number_of_users(mut self, input: ::std::option::Option<i32>) -> Self {
self.initial_number_of_users = input;
self
}
/// <p>Specifies how many concurrent users to start with. The value should be between 1 and 3.</p>
pub fn get_initial_number_of_users(&self) -> &::std::option::Option<i32> {
&self.initial_number_of_users
}
/// <p>Specified how many new users to spawn in a minute.</p>
pub fn spawn_rate(mut self, input: i32) -> Self {
self.spawn_rate = ::std::option::Option::Some(input);
self
}
/// <p>Specified how many new users to spawn in a minute.</p>
pub fn set_spawn_rate(mut self, input: ::std::option::Option<i32>) -> Self {
self.spawn_rate = input;
self
}
/// <p>Specified how many new users to spawn in a minute.</p>
pub fn get_spawn_rate(&self) -> &::std::option::Option<i32> {
&self.spawn_rate
}
/// <p>Specifies how long a traffic phase should be. For custom load tests, the value should be between 120 and 3600. This value should not exceed <code>JobDurationInSeconds</code>.</p>
pub fn duration_in_seconds(mut self, input: i32) -> Self {
self.duration_in_seconds = ::std::option::Option::Some(input);
self
}
/// <p>Specifies how long a traffic phase should be. For custom load tests, the value should be between 120 and 3600. This value should not exceed <code>JobDurationInSeconds</code>.</p>
pub fn set_duration_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
self.duration_in_seconds = input;
self
}
/// <p>Specifies how long a traffic phase should be. For custom load tests, the value should be between 120 and 3600. This value should not exceed <code>JobDurationInSeconds</code>.</p>
pub fn get_duration_in_seconds(&self) -> &::std::option::Option<i32> {
&self.duration_in_seconds
}
/// Consumes the builder and constructs a [`Phase`](crate::types::Phase).
pub fn build(self) -> crate::types::Phase {
crate::types::Phase {
initial_number_of_users: self.initial_number_of_users,
spawn_rate: self.spawn_rate,
duration_in_seconds: self.duration_in_seconds,
}
}
}