All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.gamelift.model.Build Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS GameLift module holds the client classes that are used for communicating with AWS GameLift service.

There is a newer version: 1.11.8
Show newest version
/*
 * Copyright 2010-2016 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;

/**
 * 

* Properties describing a game build. *

*/ public class Build implements Serializable, Cloneable { /** *

* Unique identifier for a build. *

*/ private String buildId; /** *

* Descriptive label associated with this build. Build names do not need to * be unique. It can be set using CreateBuild or UpdateBuild. *

*/ private String name; /** *

* Version associated with this build. Version strings do not need to be * unique to a build. This value can be set using CreateBuild or * UpdateBuild. *

*/ private String version; /** *

* Current status of the build. Possible build states include: *

    *
  • INITIALIZED: A new build has been defined, but no files have been * uploaded. You cannot create fleets for builds that are in this state. * When a build is successfully created, the build state 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.
  • *
*

*/ private String status; /** *

* File size of the uploaded game build, expressed in bytes. When the build * state is INITIALIZED, this value is 0. *

*/ private Long sizeOnDisk; /** *

* Time stamp indicating when this object was created. Format is an integer * representing the number of seconds since the Unix epoch (Unix time). *

*/ private java.util.Date creationTime; /** *

* Unique identifier for a build. *

* * @param buildId * Unique identifier for a build. */ public void setBuildId(String buildId) { this.buildId = buildId; } /** *

* Unique identifier for a build. *

* * @return Unique identifier for a build. */ public String getBuildId() { return this.buildId; } /** *

* Unique identifier for a build. *

* * @param buildId * Unique identifier for a 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; } /** *

* Descriptive label associated with this build. Build names do not need to * be unique. It can be set using CreateBuild or UpdateBuild. *

* * @param name * Descriptive label associated with this build. Build names do not * need to be unique. It can be set using CreateBuild or * UpdateBuild. */ public void setName(String name) { this.name = name; } /** *

* Descriptive label associated with this build. Build names do not need to * be unique. It can be set using CreateBuild or UpdateBuild. *

* * @return Descriptive label associated with this build. Build names do not * need to be unique. It can be set using CreateBuild or * UpdateBuild. */ public String getName() { return this.name; } /** *

* Descriptive label associated with this build. Build names do not need to * be unique. It can be set using CreateBuild or UpdateBuild. *

* * @param name * Descriptive label associated with this build. Build names do not * 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 associated with this build. Version strings do not need to be * unique to a build. This value can be set using CreateBuild or * UpdateBuild. *

* * @param version * Version associated with this build. Version strings do not need to * be unique to a build. This value can be set using * CreateBuild or UpdateBuild. */ public void setVersion(String version) { this.version = version; } /** *

* Version associated with this build. Version strings do not need to be * unique to a build. This value can be set using CreateBuild or * UpdateBuild. *

* * @return Version associated with this build. Version strings do not need * to be unique to a build. This value can be set using * CreateBuild or UpdateBuild. */ public String getVersion() { return this.version; } /** *

* Version associated with this build. Version strings do not need to be * unique to a build. This value can be set using CreateBuild or * UpdateBuild. *

* * @param version * Version associated with this build. Version strings do not need to * be unique to a build. This value can be set using * CreateBuild or UpdateBuild. * @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 states include: *

    *
  • INITIALIZED: A new build has been defined, but no files have been * uploaded. You cannot create fleets for builds that are in this state. * When a build is successfully created, the build state 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.
  • *
*

* * @param status * Current status of the build. Possible build states include: *
    *
  • INITIALIZED: A new build has been defined, but no files have * been uploaded. You cannot create fleets for builds that are in * this state. When a build is successfully created, the build state * 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.
  • *
* @see BuildStatus */ public void setStatus(String status) { this.status = status; } /** *

* Current status of the build. Possible build states include: *

    *
  • INITIALIZED: A new build has been defined, but no files have been * uploaded. You cannot create fleets for builds that are in this state. * When a build is successfully created, the build state 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.
  • *
*

* * @return Current status of the build. Possible build states include: *
    *
  • INITIALIZED: A new build has been defined, but no files have * been uploaded. You cannot create fleets for builds that are in * this state. When a build is successfully created, the build state * 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.
  • *
* @see BuildStatus */ public String getStatus() { return this.status; } /** *

* Current status of the build. Possible build states include: *

    *
  • INITIALIZED: A new build has been defined, but no files have been * uploaded. You cannot create fleets for builds that are in this state. * When a build is successfully created, the build state 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.
  • *
*

* * @param status * Current status of the build. Possible build states include: *
    *
  • INITIALIZED: A new build has been defined, but no files have * been uploaded. You cannot create fleets for builds that are in * this state. When a build is successfully created, the build state * 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.
  • *
* @return Returns a reference to this object so that method calls can be * chained together. * @see BuildStatus */ public Build withStatus(String status) { setStatus(status); return this; } /** *

* Current status of the build. Possible build states include: *

    *
  • INITIALIZED: A new build has been defined, but no files have been * uploaded. You cannot create fleets for builds that are in this state. * When a build is successfully created, the build state 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.
  • *
*

* * @param status * Current status of the build. Possible build states include: *
    *
  • INITIALIZED: A new build has been defined, but no files have * been uploaded. You cannot create fleets for builds that are in * this state. When a build is successfully created, the build state * 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.
  • *
* @see BuildStatus */ public void setStatus(BuildStatus status) { this.status = status.toString(); } /** *

* Current status of the build. Possible build states include: *

    *
  • INITIALIZED: A new build has been defined, but no files have been * uploaded. You cannot create fleets for builds that are in this state. * When a build is successfully created, the build state 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.
  • *
*

* * @param status * Current status of the build. Possible build states include: *
    *
  • INITIALIZED: A new build has been defined, but no files have * been uploaded. You cannot create fleets for builds that are in * this state. When a build is successfully created, the build state * 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.
  • *
* @return Returns a reference to this object so that method calls can be * chained together. * @see BuildStatus */ public Build withStatus(BuildStatus status) { setStatus(status); return this; } /** *

* File size of the uploaded game build, expressed in bytes. When the build * state is INITIALIZED, this value is 0. *

* * @param sizeOnDisk * File size of the uploaded game build, expressed in bytes. When the * build state is INITIALIZED, 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 * state is INITIALIZED, this value is 0. *

* * @return File size of the uploaded game build, expressed in bytes. When * the build state is INITIALIZED, this value is 0. */ public Long getSizeOnDisk() { return this.sizeOnDisk; } /** *

* File size of the uploaded game build, expressed in bytes. When the build * state is INITIALIZED, this value is 0. *

* * @param sizeOnDisk * File size of the uploaded game build, expressed in bytes. When the * build state is INITIALIZED, 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; } /** *

* Time stamp indicating when this object was created. Format is an integer * representing the number of seconds since the Unix epoch (Unix time). *

* * @param creationTime * Time stamp indicating when this object was created. Format is an * integer representing the number of seconds since the Unix epoch * (Unix time). */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* Time stamp indicating when this object was created. Format is an integer * representing the number of seconds since the Unix epoch (Unix time). *

* * @return Time stamp indicating when this object was created. Format is an * integer representing the number of seconds since the Unix epoch * (Unix time). */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

* Time stamp indicating when this object was created. Format is an integer * representing the number of seconds since the Unix epoch (Unix time). *

* * @param creationTime * Time stamp indicating when this object was created. Format is an * integer representing the number of seconds since the Unix epoch * (Unix time). * @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; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @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: " + getBuildId() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getVersion() != null) sb.append("Version: " + getVersion() + ","); if (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getSizeOnDisk() != null) sb.append("SizeOnDisk: " + getSizeOnDisk() + ","); if (getCreationTime() != null) sb.append("CreationTime: " + getCreationTime()); 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.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.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == 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 + ((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 + ((getCreationTime() == null) ? 0 : getCreationTime() .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); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy