aws-sdk-gamelift 0.26.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>
    #[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,
        }
    }
}