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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Properties describing a custom game build.</p>
/// <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets">All APIs by task</a> </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Build {
/// <p>A unique identifier for the build.</p>
#[doc(hidden)]
pub build_id: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) assigned to a GameLift build resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:
/// <region>
/// ::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
/// </region></code>. In a GameLift build ARN, the resource ID matches the <i>BuildId</i> value.</p>
#[doc(hidden)]
pub build_arn: std::option::Option<std::string::String>,
/// <p>A descriptive label associated with a build. Build names do not need to be unique. It can be set using <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateBuild.html">CreateBuild</a> or <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/UpdateBuild">UpdateBuild</a>.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>Version information associated with a build or script. Version strings do not need to be unique.</p>
#[doc(hidden)]
pub version: std::option::Option<std::string::String>,
/// <p>Current status of the build.</p>
/// <p>Possible build statuses include the following:</p>
/// <ul>
/// <li> <p> <b>INITIALIZED</b> -- A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value. </p> </li>
/// <li> <p> <b>READY</b> -- The game build has been successfully uploaded. You can now create new fleets for this build.</p> </li>
/// <li> <p> <b>FAILED</b> -- The game build upload failed. You cannot create new fleets for this build. </p> </li>
/// </ul>
#[doc(hidden)]
pub status: std::option::Option<crate::types::BuildStatus>,
/// <p>File size of the uploaded game build, expressed in bytes. When the build status is <code>INITIALIZED</code> or when using a custom Amazon S3 storage location, this value is 0.</p>
#[doc(hidden)]
pub size_on_disk: std::option::Option<i64>,
/// <p>Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build.</p>
#[doc(hidden)]
pub operating_system: std::option::Option<crate::types::OperatingSystem>,
/// <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 GameLift Server SDK version used to develop your game server.</p>
#[doc(hidden)]
pub server_sdk_version: std::option::Option<std::string::String>,
}
impl Build {
/// <p>A unique identifier for the build.</p>
pub fn build_id(&self) -> std::option::Option<&str> {
self.build_id.as_deref()
}
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) assigned to a GameLift build resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:
/// <region>
/// ::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
/// </region></code>. In a GameLift build ARN, the resource ID matches the <i>BuildId</i> value.</p>
pub fn build_arn(&self) -> std::option::Option<&str> {
self.build_arn.as_deref()
}
/// <p>A descriptive label associated with a build. Build names do not need to be unique. It can be set using <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateBuild.html">CreateBuild</a> or <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/UpdateBuild">UpdateBuild</a>.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>Version information associated with a build or script. Version strings do not need to be unique.</p>
pub fn version(&self) -> std::option::Option<&str> {
self.version.as_deref()
}
/// <p>Current status of the build.</p>
/// <p>Possible build statuses include the following:</p>
/// <ul>
/// <li> <p> <b>INITIALIZED</b> -- A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value. </p> </li>
/// <li> <p> <b>READY</b> -- The game build has been successfully uploaded. You can now create new fleets for this build.</p> </li>
/// <li> <p> <b>FAILED</b> -- The game build upload failed. You cannot create new fleets for this build. </p> </li>
/// </ul>
pub fn status(&self) -> std::option::Option<&crate::types::BuildStatus> {
self.status.as_ref()
}
/// <p>File size of the uploaded game build, expressed in bytes. When the build status is <code>INITIALIZED</code> or when using a custom Amazon S3 storage location, this value is 0.</p>
pub fn size_on_disk(&self) -> std::option::Option<i64> {
self.size_on_disk
}
/// <p>Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build.</p>
pub fn operating_system(&self) -> std::option::Option<&crate::types::OperatingSystem> {
self.operating_system.as_ref()
}
/// <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 GameLift Server SDK version used to develop your game server.</p>
pub fn server_sdk_version(&self) -> std::option::Option<&str> {
self.server_sdk_version.as_deref()
}
}
impl Build {
/// Creates a new builder-style object to manufacture [`Build`](crate::types::Build).
pub fn builder() -> crate::types::builders::BuildBuilder {
crate::types::builders::BuildBuilder::default()
}
}
/// A builder for [`Build`](crate::types::Build).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct BuildBuilder {
pub(crate) build_id: std::option::Option<std::string::String>,
pub(crate) build_arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) version: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::types::BuildStatus>,
pub(crate) size_on_disk: std::option::Option<i64>,
pub(crate) operating_system: std::option::Option<crate::types::OperatingSystem>,
pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) server_sdk_version: std::option::Option<std::string::String>,
}
impl BuildBuilder {
/// <p>A unique identifier for the build.</p>
pub fn build_id(mut self, input: impl Into<std::string::String>) -> Self {
self.build_id = Some(input.into());
self
}
/// <p>A unique identifier for the build.</p>
pub fn set_build_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.build_id = input;
self
}
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) assigned to a GameLift build resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:
/// <region>
/// ::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
/// </region></code>. In a GameLift build ARN, the resource ID matches the <i>BuildId</i> value.</p>
pub fn build_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.build_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) assigned to a GameLift build resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:
/// <region>
/// ::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
/// </region></code>. In a GameLift build ARN, the resource ID matches the <i>BuildId</i> value.</p>
pub fn set_build_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.build_arn = input;
self
}
/// <p>A descriptive label associated with a build. Build names do not need to be unique. It can be set using <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateBuild.html">CreateBuild</a> or <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/UpdateBuild">UpdateBuild</a>.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>A descriptive label associated with a build. Build names do not need to be unique. It can be set using <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateBuild.html">CreateBuild</a> or <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/UpdateBuild">UpdateBuild</a>.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>Version information associated with a build or script. Version strings do not need to be unique.</p>
pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
self.version = Some(input.into());
self
}
/// <p>Version information associated with a build or script. Version strings do not need to be unique.</p>
pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version = input;
self
}
/// <p>Current status of the build.</p>
/// <p>Possible build statuses include the following:</p>
/// <ul>
/// <li> <p> <b>INITIALIZED</b> -- A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value. </p> </li>
/// <li> <p> <b>READY</b> -- The game build has been successfully uploaded. You can now create new fleets for this build.</p> </li>
/// <li> <p> <b>FAILED</b> -- The game build upload failed. You cannot create new fleets for this build. </p> </li>
/// </ul>
pub fn status(mut self, input: crate::types::BuildStatus) -> Self {
self.status = Some(input);
self
}
/// <p>Current status of the build.</p>
/// <p>Possible build statuses include the following:</p>
/// <ul>
/// <li> <p> <b>INITIALIZED</b> -- A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value. </p> </li>
/// <li> <p> <b>READY</b> -- The game build has been successfully uploaded. You can now create new fleets for this build.</p> </li>
/// <li> <p> <b>FAILED</b> -- The game build upload failed. You cannot create new fleets for this build. </p> </li>
/// </ul>
pub fn set_status(mut self, input: std::option::Option<crate::types::BuildStatus>) -> Self {
self.status = input;
self
}
/// <p>File size of the uploaded game build, expressed in bytes. When the build status is <code>INITIALIZED</code> or when using a custom Amazon S3 storage location, this value is 0.</p>
pub fn size_on_disk(mut self, input: i64) -> Self {
self.size_on_disk = Some(input);
self
}
/// <p>File size of the uploaded game build, expressed in bytes. When the build status is <code>INITIALIZED</code> or when using a custom Amazon S3 storage location, this value is 0.</p>
pub fn set_size_on_disk(mut self, input: std::option::Option<i64>) -> Self {
self.size_on_disk = input;
self
}
/// <p>Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build.</p>
pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
self.operating_system = Some(input);
self
}
/// <p>Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build.</p>
pub fn set_operating_system(
mut self,
input: std::option::Option<crate::types::OperatingSystem>,
) -> Self {
self.operating_system = 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 GameLift Server SDK version used to develop your game server.</p>
pub fn server_sdk_version(mut self, input: impl Into<std::string::String>) -> Self {
self.server_sdk_version = Some(input.into());
self
}
/// <p>The GameLift Server SDK version used to develop your game server.</p>
pub fn set_server_sdk_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.server_sdk_version = input;
self
}
/// Consumes the builder and constructs a [`Build`](crate::types::Build).
pub fn build(self) -> crate::types::Build {
crate::types::Build {
build_id: self.build_id,
build_arn: self.build_arn,
name: self.name,
version: self.version,
status: self.status,
size_on_disk: self.size_on_disk,
operating_system: self.operating_system,
creation_time: self.creation_time,
server_sdk_version: self.server_sdk_version,
}
}
}