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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Resources used to host your game servers. A compute resource can be managed GameLift Amazon EC2 instances or your own resources.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Compute {
/// <p>A unique identifier for the fleet that the compute is registered to.</p>
#[doc(hidden)]
pub fleet_id: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the fleet that the compute is registered to.</p>
#[doc(hidden)]
pub fleet_arn: std::option::Option<std::string::String>,
/// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
#[doc(hidden)]
pub compute_name: std::option::Option<std::string::String>,
/// <p>The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.</p>
#[doc(hidden)]
pub compute_arn: std::option::Option<std::string::String>,
/// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
#[doc(hidden)]
pub ip_address: std::option::Option<std::string::String>,
/// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
#[doc(hidden)]
pub dns_name: std::option::Option<std::string::String>,
/// <p>Current status of the compute. A compute must have an <code>ACTIVE</code> status to host game sessions.</p>
#[doc(hidden)]
pub compute_status: std::option::Option<crate::types::ComputeStatus>,
/// <p>The name of the custom location you added to the fleet that this compute resource resides in.</p>
#[doc(hidden)]
pub location: std::option::Option<std::string::String>,
/// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
#[doc(hidden)]
pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The type of operating system on your compute resource.</p>
#[doc(hidden)]
pub operating_system: std::option::Option<crate::types::OperatingSystem>,
/// <p>Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.</p>
#[doc(hidden)]
pub r#type: std::option::Option<crate::types::Ec2InstanceType>,
/// <p>The endpoint connection details of the GameLift SDK endpoint that your game server connects to.</p>
#[doc(hidden)]
pub game_lift_service_sdk_endpoint: std::option::Option<std::string::String>,
}
impl Compute {
/// <p>A unique identifier for the fleet that the compute is registered to.</p>
pub fn fleet_id(&self) -> std::option::Option<&str> {
self.fleet_id.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the fleet that the compute is registered to.</p>
pub fn fleet_arn(&self) -> std::option::Option<&str> {
self.fleet_arn.as_deref()
}
/// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
pub fn compute_name(&self) -> std::option::Option<&str> {
self.compute_name.as_deref()
}
/// <p>The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.</p>
pub fn compute_arn(&self) -> std::option::Option<&str> {
self.compute_arn.as_deref()
}
/// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
/// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
pub fn dns_name(&self) -> std::option::Option<&str> {
self.dns_name.as_deref()
}
/// <p>Current status of the compute. A compute must have an <code>ACTIVE</code> status to host game sessions.</p>
pub fn compute_status(&self) -> std::option::Option<&crate::types::ComputeStatus> {
self.compute_status.as_ref()
}
/// <p>The name of the custom location you added to the fleet that this compute resource resides in.</p>
pub fn location(&self) -> std::option::Option<&str> {
self.location.as_deref()
}
/// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
/// <p>The type of operating system on your compute resource.</p>
pub fn operating_system(&self) -> std::option::Option<&crate::types::OperatingSystem> {
self.operating_system.as_ref()
}
/// <p>Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.</p>
pub fn r#type(&self) -> std::option::Option<&crate::types::Ec2InstanceType> {
self.r#type.as_ref()
}
/// <p>The endpoint connection details of the GameLift SDK endpoint that your game server connects to.</p>
pub fn game_lift_service_sdk_endpoint(&self) -> std::option::Option<&str> {
self.game_lift_service_sdk_endpoint.as_deref()
}
}
impl Compute {
/// Creates a new builder-style object to manufacture [`Compute`](crate::types::Compute).
pub fn builder() -> crate::types::builders::ComputeBuilder {
crate::types::builders::ComputeBuilder::default()
}
}
/// A builder for [`Compute`](crate::types::Compute).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ComputeBuilder {
pub(crate) fleet_id: std::option::Option<std::string::String>,
pub(crate) fleet_arn: std::option::Option<std::string::String>,
pub(crate) compute_name: std::option::Option<std::string::String>,
pub(crate) compute_arn: std::option::Option<std::string::String>,
pub(crate) ip_address: std::option::Option<std::string::String>,
pub(crate) dns_name: std::option::Option<std::string::String>,
pub(crate) compute_status: std::option::Option<crate::types::ComputeStatus>,
pub(crate) location: std::option::Option<std::string::String>,
pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) operating_system: std::option::Option<crate::types::OperatingSystem>,
pub(crate) r#type: std::option::Option<crate::types::Ec2InstanceType>,
pub(crate) game_lift_service_sdk_endpoint: std::option::Option<std::string::String>,
}
impl ComputeBuilder {
/// <p>A unique identifier for the fleet that the compute is registered to.</p>
pub fn fleet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.fleet_id = Some(input.into());
self
}
/// <p>A unique identifier for the fleet that the compute is registered to.</p>
pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.fleet_id = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the fleet that the compute is registered to.</p>
pub fn fleet_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.fleet_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the fleet that the compute is registered to.</p>
pub fn set_fleet_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.fleet_arn = input;
self
}
/// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
pub fn compute_name(mut self, input: impl Into<std::string::String>) -> Self {
self.compute_name = Some(input.into());
self
}
/// <p>A descriptive label that is associated with the compute resource registered to your fleet.</p>
pub fn set_compute_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.compute_name = input;
self
}
/// <p>The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.</p>
pub fn compute_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.compute_arn = Some(input.into());
self
}
/// <p>The ARN that is assigned to the compute resource and uniquely identifies it. ARNs are unique across locations.</p>
pub fn set_compute_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.compute_arn = input;
self
}
/// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_address = Some(input.into());
self
}
/// <p>The IP address of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
/// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
pub fn dns_name(mut self, input: impl Into<std::string::String>) -> Self {
self.dns_name = Some(input.into());
self
}
/// <p>The DNS name of the compute resource. GameLift requires the DNS name or IP address to manage your compute resource.</p>
pub fn set_dns_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.dns_name = input;
self
}
/// <p>Current status of the compute. A compute must have an <code>ACTIVE</code> status to host game sessions.</p>
pub fn compute_status(mut self, input: crate::types::ComputeStatus) -> Self {
self.compute_status = Some(input);
self
}
/// <p>Current status of the compute. A compute must have an <code>ACTIVE</code> status to host game sessions.</p>
pub fn set_compute_status(
mut self,
input: std::option::Option<crate::types::ComputeStatus>,
) -> Self {
self.compute_status = input;
self
}
/// <p>The name of the custom location you added to the fleet that this compute resource resides in.</p>
pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
self.location = Some(input.into());
self
}
/// <p>The name of the custom location you added to the fleet that this compute resource resides in.</p>
pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
self.location = input;
self
}
/// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.creation_time = Some(input);
self
}
/// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
pub fn set_creation_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.creation_time = input;
self
}
/// <p>The type of operating system on your compute resource.</p>
pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
self.operating_system = Some(input);
self
}
/// <p>The type of operating system on your compute resource.</p>
pub fn set_operating_system(
mut self,
input: std::option::Option<crate::types::OperatingSystem>,
) -> Self {
self.operating_system = input;
self
}
/// <p>Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.</p>
pub fn r#type(mut self, input: crate::types::Ec2InstanceType) -> Self {
self.r#type = Some(input);
self
}
/// <p>Which compute type that the fleet uses. A fleet can use Anywhere compute resources owned by you or managed Amazon EC2 instances.</p>
pub fn set_type(mut self, input: std::option::Option<crate::types::Ec2InstanceType>) -> Self {
self.r#type = input;
self
}
/// <p>The endpoint connection details of the GameLift SDK endpoint that your game server connects to.</p>
pub fn game_lift_service_sdk_endpoint(mut self, input: impl Into<std::string::String>) -> Self {
self.game_lift_service_sdk_endpoint = Some(input.into());
self
}
/// <p>The endpoint connection details of the GameLift SDK endpoint that your game server connects to.</p>
pub fn set_game_lift_service_sdk_endpoint(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.game_lift_service_sdk_endpoint = input;
self
}
/// Consumes the builder and constructs a [`Compute`](crate::types::Compute).
pub fn build(self) -> crate::types::Compute {
crate::types::Compute {
fleet_id: self.fleet_id,
fleet_arn: self.fleet_arn,
compute_name: self.compute_name,
compute_arn: self.compute_arn,
ip_address: self.ip_address,
dns_name: self.dns_name,
compute_status: self.compute_status,
location: self.location,
creation_time: self.creation_time,
operating_system: self.operating_system,
r#type: self.r#type,
game_lift_service_sdk_endpoint: self.game_lift_service_sdk_endpoint,
}
}
}