/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.gamelift.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Properties describing a custom game build. *
** All APIs by task *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Build implements Serializable, Cloneable, StructuredPojo { /** ** A unique identifier for the build. *
*/ private String buildId; /** *
* The Amazon Resource Name (ARN)
* assigned to a Amazon GameLift build resource and uniquely identifies it. ARNs are unique across all Regions.
* Format is arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
. In a
* GameLift build ARN, the resource ID matches the BuildId value.
*
* A descriptive label associated with a build. Build names don't need to be unique. It can be set using CreateBuild or UpdateBuild. *
*/ private String name; /** ** Version information associated with a build or script. Version strings don't need to be unique. *
*/ private String version; /** ** Current status of the build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
*
* File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED
or
* when using a custom Amazon S3 storage location, this value is 0.
*
* 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. *
*/ private String operatingSystem; /** *
* A time stamp indicating when this data object was created. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*
* The Amazon GameLift Server SDK version used to develop your game server. *
*/ private String serverSdkVersion; /** ** A unique identifier for the build. *
* * @param buildId * A unique identifier for the build. */ public void setBuildId(String buildId) { this.buildId = buildId; } /** ** A unique identifier for the build. *
* * @return A unique identifier for the build. */ public String getBuildId() { return this.buildId; } /** ** A unique identifier for the build. *
* * @param buildId * A unique identifier for the build. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withBuildId(String buildId) { setBuildId(buildId); return this; } /** *
* The Amazon Resource Name (ARN)
* assigned to a Amazon GameLift build resource and uniquely identifies it. ARNs are unique across all Regions.
* Format is arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
. In a
* GameLift build ARN, the resource ID matches the BuildId value.
*
arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
. In a
* GameLift build ARN, the resource ID matches the BuildId value.
*/
public void setBuildArn(String buildArn) {
this.buildArn = buildArn;
}
/**
*
* The Amazon Resource Name (ARN)
* assigned to a Amazon GameLift build resource and uniquely identifies it. ARNs are unique across all Regions.
* Format is arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
. In a
* GameLift build ARN, the resource ID matches the BuildId value.
*
arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
. In a
* GameLift build ARN, the resource ID matches the BuildId value.
*/
public String getBuildArn() {
return this.buildArn;
}
/**
*
* The Amazon Resource Name (ARN)
* assigned to a Amazon GameLift build resource and uniquely identifies it. ARNs are unique across all Regions.
* Format is arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
. In a
* GameLift build ARN, the resource ID matches the BuildId value.
*
arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
. In a
* GameLift build ARN, the resource ID matches the BuildId value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withBuildArn(String buildArn) {
setBuildArn(buildArn);
return this;
}
/**
* * A descriptive label associated with a build. Build names don't need to be unique. It can be set using CreateBuild or UpdateBuild. *
* * @param name * A descriptive label associated with a build. Build names don't need to be unique. It can be set using CreateBuild or UpdateBuild. */ public void setName(String name) { this.name = name; } /** ** A descriptive label associated with a build. Build names don't need to be unique. It can be set using CreateBuild or UpdateBuild. *
* * @return A descriptive label associated with a build. Build names don't need to be unique. It can be set using CreateBuild or * UpdateBuild. */ public String getName() { return this.name; } /** ** A descriptive label associated with a build. Build names don't need to be unique. It can be set using CreateBuild or UpdateBuild. *
* * @param name * A descriptive label associated with a build. Build names don't need to be unique. It can be set using CreateBuild or UpdateBuild. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withName(String name) { setName(name); return this; } /** ** Version information associated with a build or script. Version strings don't need to be unique. *
* * @param version * Version information associated with a build or script. Version strings don't need to be unique. */ public void setVersion(String version) { this.version = version; } /** ** Version information associated with a build or script. Version strings don't need to be unique. *
* * @return Version information associated with a build or script. Version strings don't need to be unique. */ public String getVersion() { return this.version; } /** ** Version information associated with a build or script. Version strings don't need to be unique. *
* * @param version * Version information associated with a build or script. Version strings don't need to be unique. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withVersion(String version) { setVersion(version); return this; } /** ** Current status of the build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this * build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
** Current status of the build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this * build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
** Current status of the build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this * build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
** Current status of the build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this * build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
** Current status of the build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
** Possible build statuses include the following: *
** INITIALIZED -- 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. *
** READY -- The game build has been successfully uploaded. You can now create new fleets for this * build. *
** FAILED -- The game build upload failed. You cannot create new fleets for this build. *
*
* File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED
or
* when using a custom Amazon S3 storage location, this value is 0.
*
INITIALIZED
or when using a custom Amazon S3 storage location, this value is 0.
*/
public void setSizeOnDisk(Long sizeOnDisk) {
this.sizeOnDisk = sizeOnDisk;
}
/**
*
* File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED
or
* when using a custom Amazon S3 storage location, this value is 0.
*
INITIALIZED
or when using a custom Amazon S3 storage location, this value is 0.
*/
public Long getSizeOnDisk() {
return this.sizeOnDisk;
}
/**
*
* File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED
or
* when using a custom Amazon S3 storage location, this value is 0.
*
INITIALIZED
or when using a custom Amazon S3 storage location, this value is 0.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withSizeOnDisk(Long sizeOnDisk) {
setSizeOnDisk(sizeOnDisk);
return this;
}
/**
* * 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. *
* * @param operatingSystem * 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. * @see OperatingSystem */ public void setOperatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; } /** ** 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. *
* * @return 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. * @see OperatingSystem */ public String getOperatingSystem() { return this.operatingSystem; } /** ** 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. *
* * @param operatingSystem * 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. * @return Returns a reference to this object so that method calls can be chained together. * @see OperatingSystem */ public Build withOperatingSystem(String operatingSystem) { setOperatingSystem(operatingSystem); return this; } /** ** 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. *
* * @param operatingSystem * 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. * @see OperatingSystem */ public void setOperatingSystem(OperatingSystem operatingSystem) { withOperatingSystem(operatingSystem); } /** ** 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. *
* * @param operatingSystem * 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. * @return Returns a reference to this object so that method calls can be chained together. * @see OperatingSystem */ public Build withOperatingSystem(OperatingSystem operatingSystem) { this.operatingSystem = operatingSystem.toString(); return this; } /** *
* A time stamp indicating when this data object was created. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*
"1469498468.057"
).
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* A time stamp indicating when this data object was created. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*
"1469498468.057"
).
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* A time stamp indicating when this data object was created. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*
"1469498468.057"
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
* * The Amazon GameLift Server SDK version used to develop your game server. *
* * @param serverSdkVersion * The Amazon GameLift Server SDK version used to develop your game server. */ public void setServerSdkVersion(String serverSdkVersion) { this.serverSdkVersion = serverSdkVersion; } /** ** The Amazon GameLift Server SDK version used to develop your game server. *
* * @return The Amazon GameLift Server SDK version used to develop your game server. */ public String getServerSdkVersion() { return this.serverSdkVersion; } /** ** The Amazon GameLift Server SDK version used to develop your game server. *
* * @param serverSdkVersion * The Amazon GameLift Server SDK version used to develop your game server. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withServerSdkVersion(String serverSdkVersion) { setServerSdkVersion(serverSdkVersion); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBuildId() != null) sb.append("BuildId: ").append(getBuildId()).append(","); if (getBuildArn() != null) sb.append("BuildArn: ").append(getBuildArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getSizeOnDisk() != null) sb.append("SizeOnDisk: ").append(getSizeOnDisk()).append(","); if (getOperatingSystem() != null) sb.append("OperatingSystem: ").append(getOperatingSystem()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getServerSdkVersion() != null) sb.append("ServerSdkVersion: ").append(getServerSdkVersion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Build == false) return false; Build other = (Build) obj; if (other.getBuildId() == null ^ this.getBuildId() == null) return false; if (other.getBuildId() != null && other.getBuildId().equals(this.getBuildId()) == false) return false; if (other.getBuildArn() == null ^ this.getBuildArn() == null) return false; if (other.getBuildArn() != null && other.getBuildArn().equals(this.getBuildArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSizeOnDisk() == null ^ this.getSizeOnDisk() == null) return false; if (other.getSizeOnDisk() != null && other.getSizeOnDisk().equals(this.getSizeOnDisk()) == false) return false; if (other.getOperatingSystem() == null ^ this.getOperatingSystem() == null) return false; if (other.getOperatingSystem() != null && other.getOperatingSystem().equals(this.getOperatingSystem()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getServerSdkVersion() == null ^ this.getServerSdkVersion() == null) return false; if (other.getServerSdkVersion() != null && other.getServerSdkVersion().equals(this.getServerSdkVersion()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBuildId() == null) ? 0 : getBuildId().hashCode()); hashCode = prime * hashCode + ((getBuildArn() == null) ? 0 : getBuildArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSizeOnDisk() == null) ? 0 : getSizeOnDisk().hashCode()); hashCode = prime * hashCode + ((getOperatingSystem() == null) ? 0 : getOperatingSystem().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getServerSdkVersion() == null) ? 0 : getServerSdkVersion().hashCode()); return hashCode; } @Override public Build clone() { try { return (Build) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.gamelift.model.transform.BuildMarshaller.getInstance().marshall(this, protocolMarshaller); } }