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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateFleetAttributesInput {
/// <p>A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value.</p>
pub fleet_id: ::std::option::Option<::std::string::String>,
/// <p>A descriptive label that is associated with a fleet. Fleet names do not need to be unique.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>A human-readable description of a fleet.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The game session protection policy to apply to all new game sessions created in this fleet. Game sessions that already exist are not affected. You can set protection for individual game sessions using <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a> .</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub new_game_session_protection_policy: ::std::option::Option<crate::types::ProtectionPolicy>,
/// <p>Policy settings that limit the number of game sessions an individual player can create over a span of time.</p>
pub resource_creation_limit_policy: ::std::option::Option<crate::types::ResourceCreationLimitPolicy>,
/// <p>The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new name. A fleet can only be in one metric group at a time.</p>
pub metric_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Amazon GameLift Servers Anywhere configuration options.</p>
pub anywhere_configuration: ::std::option::Option<crate::types::AnywhereConfiguration>,
}
impl UpdateFleetAttributesInput {
/// <p>A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value.</p>
pub fn fleet_id(&self) -> ::std::option::Option<&str> {
self.fleet_id.as_deref()
}
/// <p>A descriptive label that is associated with a fleet. Fleet names do not need to be unique.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>A human-readable description of a fleet.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The game session protection policy to apply to all new game sessions created in this fleet. Game sessions that already exist are not affected. You can set protection for individual game sessions using <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a> .</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub fn new_game_session_protection_policy(&self) -> ::std::option::Option<&crate::types::ProtectionPolicy> {
self.new_game_session_protection_policy.as_ref()
}
/// <p>Policy settings that limit the number of game sessions an individual player can create over a span of time.</p>
pub fn resource_creation_limit_policy(&self) -> ::std::option::Option<&crate::types::ResourceCreationLimitPolicy> {
self.resource_creation_limit_policy.as_ref()
}
/// <p>The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new name. A fleet can only be in one metric group at a time.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.metric_groups.is_none()`.
pub fn metric_groups(&self) -> &[::std::string::String] {
self.metric_groups.as_deref().unwrap_or_default()
}
/// <p>Amazon GameLift Servers Anywhere configuration options.</p>
pub fn anywhere_configuration(&self) -> ::std::option::Option<&crate::types::AnywhereConfiguration> {
self.anywhere_configuration.as_ref()
}
}
impl UpdateFleetAttributesInput {
/// Creates a new builder-style object to manufacture [`UpdateFleetAttributesInput`](crate::operation::update_fleet_attributes::UpdateFleetAttributesInput).
pub fn builder() -> crate::operation::update_fleet_attributes::builders::UpdateFleetAttributesInputBuilder {
crate::operation::update_fleet_attributes::builders::UpdateFleetAttributesInputBuilder::default()
}
}
/// A builder for [`UpdateFleetAttributesInput`](crate::operation::update_fleet_attributes::UpdateFleetAttributesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFleetAttributesInputBuilder {
pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) new_game_session_protection_policy: ::std::option::Option<crate::types::ProtectionPolicy>,
pub(crate) resource_creation_limit_policy: ::std::option::Option<crate::types::ResourceCreationLimitPolicy>,
pub(crate) metric_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) anywhere_configuration: ::std::option::Option<crate::types::AnywhereConfiguration>,
}
impl UpdateFleetAttributesInputBuilder {
/// <p>A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value.</p>
/// This field is required.
pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.fleet_id = ::std::option::Option::Some(input.into());
self
}
/// <p>A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value.</p>
pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.fleet_id = input;
self
}
/// <p>A unique identifier for the fleet to update attribute metadata for. You can use either the fleet ID or ARN value.</p>
pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
&self.fleet_id
}
/// <p>A descriptive label that is associated with a fleet. Fleet names do not need to be unique.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>A descriptive label that is associated with a fleet. Fleet names do not need to be unique.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>A descriptive label that is associated with a fleet. Fleet names do not need to be unique.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>A human-readable description of a fleet.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>A human-readable description of a fleet.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>A human-readable description of a fleet.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The game session protection policy to apply to all new game sessions created in this fleet. Game sessions that already exist are not affected. You can set protection for individual game sessions using <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a> .</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub fn new_game_session_protection_policy(mut self, input: crate::types::ProtectionPolicy) -> Self {
self.new_game_session_protection_policy = ::std::option::Option::Some(input);
self
}
/// <p>The game session protection policy to apply to all new game sessions created in this fleet. Game sessions that already exist are not affected. You can set protection for individual game sessions using <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a> .</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub fn set_new_game_session_protection_policy(mut self, input: ::std::option::Option<crate::types::ProtectionPolicy>) -> Self {
self.new_game_session_protection_policy = input;
self
}
/// <p>The game session protection policy to apply to all new game sessions created in this fleet. Game sessions that already exist are not affected. You can set protection for individual game sessions using <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a> .</p>
/// <ul>
/// <li>
/// <p><b>NoProtection</b> -- The game session can be terminated during a scale-down event.</p></li>
/// <li>
/// <p><b>FullProtection</b> -- If the game session is in an <code>ACTIVE</code> status, it cannot be terminated during a scale-down event.</p></li>
/// </ul>
pub fn get_new_game_session_protection_policy(&self) -> &::std::option::Option<crate::types::ProtectionPolicy> {
&self.new_game_session_protection_policy
}
/// <p>Policy settings that limit the number of game sessions an individual player can create over a span of time.</p>
pub fn resource_creation_limit_policy(mut self, input: crate::types::ResourceCreationLimitPolicy) -> Self {
self.resource_creation_limit_policy = ::std::option::Option::Some(input);
self
}
/// <p>Policy settings that limit the number of game sessions an individual player can create over a span of time.</p>
pub fn set_resource_creation_limit_policy(mut self, input: ::std::option::Option<crate::types::ResourceCreationLimitPolicy>) -> Self {
self.resource_creation_limit_policy = input;
self
}
/// <p>Policy settings that limit the number of game sessions an individual player can create over a span of time.</p>
pub fn get_resource_creation_limit_policy(&self) -> &::std::option::Option<crate::types::ResourceCreationLimitPolicy> {
&self.resource_creation_limit_policy
}
/// Appends an item to `metric_groups`.
///
/// To override the contents of this collection use [`set_metric_groups`](Self::set_metric_groups).
///
/// <p>The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new name. A fleet can only be in one metric group at a time.</p>
pub fn metric_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.metric_groups.unwrap_or_default();
v.push(input.into());
self.metric_groups = ::std::option::Option::Some(v);
self
}
/// <p>The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new name. A fleet can only be in one metric group at a time.</p>
pub fn set_metric_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.metric_groups = input;
self
}
/// <p>The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new name. A fleet can only be in one metric group at a time.</p>
pub fn get_metric_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.metric_groups
}
/// <p>Amazon GameLift Servers Anywhere configuration options.</p>
pub fn anywhere_configuration(mut self, input: crate::types::AnywhereConfiguration) -> Self {
self.anywhere_configuration = ::std::option::Option::Some(input);
self
}
/// <p>Amazon GameLift Servers Anywhere configuration options.</p>
pub fn set_anywhere_configuration(mut self, input: ::std::option::Option<crate::types::AnywhereConfiguration>) -> Self {
self.anywhere_configuration = input;
self
}
/// <p>Amazon GameLift Servers Anywhere configuration options.</p>
pub fn get_anywhere_configuration(&self) -> &::std::option::Option<crate::types::AnywhereConfiguration> {
&self.anywhere_configuration
}
/// Consumes the builder and constructs a [`UpdateFleetAttributesInput`](crate::operation::update_fleet_attributes::UpdateFleetAttributesInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_fleet_attributes::UpdateFleetAttributesInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::update_fleet_attributes::UpdateFleetAttributesInput {
fleet_id: self.fleet_id,
name: self.name,
description: self.description,
new_game_session_protection_policy: self.new_game_session_protection_policy,
resource_creation_limit_policy: self.resource_creation_limit_policy,
metric_groups: self.metric_groups,
anywhere_configuration: self.anywhere_configuration,
})
}
}