aws-sdk-gamelift 1.118.0

AWS SDK for Amazon GameLift
Documentation
// 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>
    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>) that is assigned to a Amazon GameLift Servers 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 build_arn: ::std::option::Option<::std::string::String>,
    /// <p>A descriptive label that is 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 name: ::std::option::Option<::std::string::String>,
    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
    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>
    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>
    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><note>
    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
    /// </note>
    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>
    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Amazon GameLift Servers Server SDK version used to develop your game server.</p>
    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>) that is assigned to a Amazon GameLift Servers 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 that is 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 that is 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><note>
    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
    /// </note>
    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 Amazon GameLift Servers 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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 ::std::convert::Into<::std::string::String>) -> Self {
        self.build_id = ::std::option::Option::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>A unique identifier for the build.</p>
    pub fn get_build_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.build_id
    }
    /// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a Amazon GameLift Servers 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 ::std::convert::Into<::std::string::String>) -> Self {
        self.build_arn = ::std::option::Option::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>) that is assigned to a Amazon GameLift Servers 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>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a Amazon GameLift Servers 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 get_build_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.build_arn
    }
    /// <p>A descriptive label that is 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 ::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 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>A descriptive label that is 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 get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Version information that is 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>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// <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 = ::std::option::Option::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>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 get_status(&self) -> &::std::option::Option<crate::types::BuildStatus> {
        &self.status
    }
    /// <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 = ::std::option::Option::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>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 get_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><note>
    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
    /// </note>
    pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
        self.operating_system = ::std::option::Option::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><note>
    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
    /// </note>
    pub fn set_operating_system(mut self, input: ::std::option::Option<crate::types::OperatingSystem>) -> Self {
        self.operating_system = 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><note>
    /// <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a></p>
    /// </note>
    pub fn get_operating_system(&self) -> &::std::option::Option<crate::types::OperatingSystem> {
        &self.operating_system
    }
    /// <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 = ::std::option::Option::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>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 get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The Amazon GameLift Servers Server SDK version used to develop your game server.</p>
    pub fn server_sdk_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.server_sdk_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon GameLift Servers 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
    }
    /// <p>The Amazon GameLift Servers Server SDK version used to develop your game server.</p>
    pub fn get_server_sdk_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.server_sdk_version
    }
    /// 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,
        }
    }
}