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

com.amazonaws.services.gamelift.model.Instance 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.12.780
Show newest version
/*
 * Copyright 2013-2018 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 that describe an instance of a virtual computing resource that hosts one or more game servers. A fleet may * contain zero or more instances. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Instance implements Serializable, Cloneable, StructuredPojo { /** *

* Unique identifier for a fleet that the instance is in. *

*/ private String fleetId; /** *

* Unique identifier for an instance. *

*/ private String instanceId; /** *

* IP address assigned to the instance. *

*/ private String ipAddress; /** *

* Operating system that is running on this instance. *

*/ private String operatingSystem; /** *

* EC2 instance type that defines the computing resources of this instance. *

*/ private String type; /** *

* Current status of the instance. Possible statuses include the following: *

*
    *
  • *

    * PENDING -- The instance is in the process of being created and launching server processes as defined in * the fleet's run-time configuration. *

    *
  • *
  • *

    * ACTIVE -- The instance has been successfully created and at least one server process has successfully * launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions. *

    *
  • *
  • *

    * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during * a scaling down event or to recycle resources in the event of a problem. *

    *
  • *
*/ private String status; /** *

* Time stamp indicating when this data object was created. Format is a number expressed in Unix time as * milliseconds (for example "1469498468.057"). *

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

* Unique identifier for a fleet that the instance is in. *

* * @param fleetId * Unique identifier for a fleet that the instance is in. */ public void setFleetId(String fleetId) { this.fleetId = fleetId; } /** *

* Unique identifier for a fleet that the instance is in. *

* * @return Unique identifier for a fleet that the instance is in. */ public String getFleetId() { return this.fleetId; } /** *

* Unique identifier for a fleet that the instance is in. *

* * @param fleetId * Unique identifier for a fleet that the instance is in. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withFleetId(String fleetId) { setFleetId(fleetId); return this; } /** *

* Unique identifier for an instance. *

* * @param instanceId * Unique identifier for an instance. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** *

* Unique identifier for an instance. *

* * @return Unique identifier for an instance. */ public String getInstanceId() { return this.instanceId; } /** *

* Unique identifier for an instance. *

* * @param instanceId * Unique identifier for an instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** *

* IP address assigned to the instance. *

* * @param ipAddress * IP address assigned to the instance. */ public void setIpAddress(String ipAddress) { this.ipAddress = ipAddress; } /** *

* IP address assigned to the instance. *

* * @return IP address assigned to the instance. */ public String getIpAddress() { return this.ipAddress; } /** *

* IP address assigned to the instance. *

* * @param ipAddress * IP address assigned to the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withIpAddress(String ipAddress) { setIpAddress(ipAddress); return this; } /** *

* Operating system that is running on this instance. *

* * @param operatingSystem * Operating system that is running on this instance. * @see OperatingSystem */ public void setOperatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; } /** *

* Operating system that is running on this instance. *

* * @return Operating system that is running on this instance. * @see OperatingSystem */ public String getOperatingSystem() { return this.operatingSystem; } /** *

* Operating system that is running on this instance. *

* * @param operatingSystem * Operating system that is running on this instance. * @return Returns a reference to this object so that method calls can be chained together. * @see OperatingSystem */ public Instance withOperatingSystem(String operatingSystem) { setOperatingSystem(operatingSystem); return this; } /** *

* Operating system that is running on this instance. *

* * @param operatingSystem * Operating system that is running on this instance. * @see OperatingSystem */ public void setOperatingSystem(OperatingSystem operatingSystem) { withOperatingSystem(operatingSystem); } /** *

* Operating system that is running on this instance. *

* * @param operatingSystem * Operating system that is running on this instance. * @return Returns a reference to this object so that method calls can be chained together. * @see OperatingSystem */ public Instance withOperatingSystem(OperatingSystem operatingSystem) { this.operatingSystem = operatingSystem.toString(); return this; } /** *

* EC2 instance type that defines the computing resources of this instance. *

* * @param type * EC2 instance type that defines the computing resources of this instance. * @see EC2InstanceType */ public void setType(String type) { this.type = type; } /** *

* EC2 instance type that defines the computing resources of this instance. *

* * @return EC2 instance type that defines the computing resources of this instance. * @see EC2InstanceType */ public String getType() { return this.type; } /** *

* EC2 instance type that defines the computing resources of this instance. *

* * @param type * EC2 instance type that defines the computing resources of this instance. * @return Returns a reference to this object so that method calls can be chained together. * @see EC2InstanceType */ public Instance withType(String type) { setType(type); return this; } /** *

* EC2 instance type that defines the computing resources of this instance. *

* * @param type * EC2 instance type that defines the computing resources of this instance. * @see EC2InstanceType */ public void setType(EC2InstanceType type) { withType(type); } /** *

* EC2 instance type that defines the computing resources of this instance. *

* * @param type * EC2 instance type that defines the computing resources of this instance. * @return Returns a reference to this object so that method calls can be chained together. * @see EC2InstanceType */ public Instance withType(EC2InstanceType type) { this.type = type.toString(); return this; } /** *

* Current status of the instance. Possible statuses include the following: *

*
    *
  • *

    * PENDING -- The instance is in the process of being created and launching server processes as defined in * the fleet's run-time configuration. *

    *
  • *
  • *

    * ACTIVE -- The instance has been successfully created and at least one server process has successfully * launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions. *

    *
  • *
  • *

    * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during * a scaling down event or to recycle resources in the event of a problem. *

    *
  • *
* * @param status * Current status of the instance. Possible statuses include the following:

*
    *
  • *

    * PENDING -- The instance is in the process of being created and launching server processes as * defined in the fleet's run-time configuration. *

    *
  • *
  • *

    * ACTIVE -- The instance has been successfully created and at least one server process has * successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The * instance is now considered ready to host game sessions. *

    *
  • *
  • *

    * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity * during a scaling down event or to recycle resources in the event of a problem. *

    *
  • * @see InstanceStatus */ public void setStatus(String status) { this.status = status; } /** *

    * Current status of the instance. Possible statuses include the following: *

    *
      *
    • *

      * PENDING -- The instance is in the process of being created and launching server processes as defined in * the fleet's run-time configuration. *

      *
    • *
    • *

      * ACTIVE -- The instance has been successfully created and at least one server process has successfully * launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions. *

      *
    • *
    • *

      * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during * a scaling down event or to recycle resources in the event of a problem. *

      *
    • *
    * * @return Current status of the instance. Possible statuses include the following:

    *
      *
    • *

      * PENDING -- The instance is in the process of being created and launching server processes as * defined in the fleet's run-time configuration. *

      *
    • *
    • *

      * ACTIVE -- The instance has been successfully created and at least one server process has * successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The * instance is now considered ready to host game sessions. *

      *
    • *
    • *

      * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity * during a scaling down event or to recycle resources in the event of a problem. *

      *
    • * @see InstanceStatus */ public String getStatus() { return this.status; } /** *

      * Current status of the instance. Possible statuses include the following: *

      *
        *
      • *

        * PENDING -- The instance is in the process of being created and launching server processes as defined in * the fleet's run-time configuration. *

        *
      • *
      • *

        * ACTIVE -- The instance has been successfully created and at least one server process has successfully * launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions. *

        *
      • *
      • *

        * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during * a scaling down event or to recycle resources in the event of a problem. *

        *
      • *
      * * @param status * Current status of the instance. Possible statuses include the following:

      *
        *
      • *

        * PENDING -- The instance is in the process of being created and launching server processes as * defined in the fleet's run-time configuration. *

        *
      • *
      • *

        * ACTIVE -- The instance has been successfully created and at least one server process has * successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The * instance is now considered ready to host game sessions. *

        *
      • *
      • *

        * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity * during a scaling down event or to recycle resources in the event of a problem. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceStatus */ public Instance withStatus(String status) { setStatus(status); return this; } /** *

        * Current status of the instance. Possible statuses include the following: *

        *
          *
        • *

          * PENDING -- The instance is in the process of being created and launching server processes as defined in * the fleet's run-time configuration. *

          *
        • *
        • *

          * ACTIVE -- The instance has been successfully created and at least one server process has successfully * launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions. *

          *
        • *
        • *

          * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during * a scaling down event or to recycle resources in the event of a problem. *

          *
        • *
        * * @param status * Current status of the instance. Possible statuses include the following:

        *
          *
        • *

          * PENDING -- The instance is in the process of being created and launching server processes as * defined in the fleet's run-time configuration. *

          *
        • *
        • *

          * ACTIVE -- The instance has been successfully created and at least one server process has * successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The * instance is now considered ready to host game sessions. *

          *
        • *
        • *

          * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity * during a scaling down event or to recycle resources in the event of a problem. *

          *
        • * @see InstanceStatus */ public void setStatus(InstanceStatus status) { withStatus(status); } /** *

          * Current status of the instance. Possible statuses include the following: *

          *
            *
          • *

            * PENDING -- The instance is in the process of being created and launching server processes as defined in * the fleet's run-time configuration. *

            *
          • *
          • *

            * ACTIVE -- The instance has been successfully created and at least one server process has successfully * launched and reported back to Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions. *

            *
          • *
          • *

            * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity during * a scaling down event or to recycle resources in the event of a problem. *

            *
          • *
          * * @param status * Current status of the instance. Possible statuses include the following:

          *
            *
          • *

            * PENDING -- The instance is in the process of being created and launching server processes as * defined in the fleet's run-time configuration. *

            *
          • *
          • *

            * ACTIVE -- The instance has been successfully created and at least one server process has * successfully launched and reported back to Amazon GameLift that it is ready to host a game session. The * instance is now considered ready to host game sessions. *

            *
          • *
          • *

            * TERMINATING -- The instance is in the process of shutting down. This may happen to reduce capacity * during a scaling down event or to recycle resources in the event of a problem. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceStatus */ public Instance withStatus(InstanceStatus status) { this.status = status.toString(); return this; } /** *

            * Time stamp indicating when this data object was created. Format is a number expressed in Unix time as * milliseconds (for example "1469498468.057"). *

            * * @param creationTime * Time stamp indicating when this data object was created. Format is a number expressed in Unix time as * milliseconds (for example "1469498468.057"). */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

            * Time stamp indicating when this data object was created. Format is a number expressed in Unix time as * milliseconds (for example "1469498468.057"). *

            * * @return Time stamp indicating when this data object was created. Format is a number expressed in Unix time as * milliseconds (for example "1469498468.057"). */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

            * Time stamp indicating when this data object was created. Format is a number expressed in Unix time as * milliseconds (for example "1469498468.057"). *

            * * @param creationTime * Time stamp indicating when this data object was created. Format is a number expressed in Unix time as * milliseconds (for example "1469498468.057"). * @return Returns a reference to this object so that method calls can be chained together. */ public Instance 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 (getFleetId() != null) sb.append("FleetId: ").append(getFleetId()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getIpAddress() != null) sb.append("IpAddress: ").append(getIpAddress()).append(","); if (getOperatingSystem() != null) sb.append("OperatingSystem: ").append(getOperatingSystem()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(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 Instance == false) return false; Instance other = (Instance) obj; if (other.getFleetId() == null ^ this.getFleetId() == null) return false; if (other.getFleetId() != null && other.getFleetId().equals(this.getFleetId()) == false) return false; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getIpAddress() == null ^ this.getIpAddress() == null) return false; if (other.getIpAddress() != null && other.getIpAddress().equals(this.getIpAddress()) == 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.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == 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.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 + ((getFleetId() == null) ? 0 : getFleetId().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getIpAddress() == null) ? 0 : getIpAddress().hashCode()); hashCode = prime * hashCode + ((getOperatingSystem() == null) ? 0 : getOperatingSystem().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); return hashCode; } @Override public Instance clone() { try { return (Instance) 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.InstanceMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy