/* * 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; /** *

* Represents an EC2 instance of virtual computing resources that hosts one or more game servers. In Amazon GameLift, a * fleet can contain zero or more instances. *

*

* Related actions *

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

* A unique identifier for the fleet that the instance is in. *

*/ private String fleetId; /** *

* The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all * Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 * . *

*/ private String fleetArn; /** *

* A unique identifier for the instance. *

*/ private String instanceId; /** *

* IP address that is assigned to the instance. *

*/ private String ipAddress; /** *

* The DNS identifier assigned to the instance that is running the game session. Values have the following format: *

* *

* When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP * address. *

*/ private String dnsName; /** *

* Operating system that is running on this instance. *

*/ private String operatingSystem; /** *

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

*/ private String type; /** *

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

* */ private String status; /** *

* A 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; /** *

* The fleet location of the instance, expressed as an Amazon Web Services Region code, such as * us-west-2. *

*/ private String location; /** *

* A unique identifier for the fleet that the instance is in. *

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

* A unique identifier for the fleet that the instance is in. *

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

* A unique identifier for the fleet that the instance is in. *

* * @param fleetId * A unique identifier for the 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; } /** *

* The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all * Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 * . *

* * @param fleetArn * The Amazon Resource Name (ARN) that is assigned to a * Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. */ public void setFleetArn(String fleetArn) { this.fleetArn = fleetArn; } /** *

* The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all * Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 * . *

* * @return The Amazon Resource Name (ARN) that is assigned to a * Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. */ public String getFleetArn() { return this.fleetArn; } /** *

* The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all * Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 * . *

* * @param fleetArn * The Amazon Resource Name (ARN) that is assigned to a * Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withFleetArn(String fleetArn) { setFleetArn(fleetArn); return this; } /** *

* A unique identifier for the instance. *

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

* A unique identifier for the instance. *

* * @return A unique identifier for the instance. */ public String getInstanceId() { return this.instanceId; } /** *

* A unique identifier for the instance. *

* * @param instanceId * A unique identifier for the 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 that is assigned to the instance. *

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

* IP address that is assigned to the instance. *

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

* IP address that is assigned to the instance. *

* * @param ipAddress * IP address that is 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; } /** *

* The DNS identifier assigned to the instance that is running the game session. Values have the following format: *

* *

* When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP * address. *

* * @param dnsName * The DNS identifier assigned to the instance that is running the game session. Values have the following * format:

* *

* When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address. */ public void setDnsName(String dnsName) { this.dnsName = dnsName; } /** *

* The DNS identifier assigned to the instance that is running the game session. Values have the following format: *

* *

* When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP * address. *

* * @return The DNS identifier assigned to the instance that is running the game session. Values have the following * format:

* *

* When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address. */ public String getDnsName() { return this.dnsName; } /** *

* The DNS identifier assigned to the instance that is running the game session. Values have the following format: *

* *

* When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP * address. *

* * @param dnsName * The DNS identifier assigned to the instance that is running the game session. Values have the following * format:

* *

* When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address. * @return Returns a reference to this object so that method calls can be chained together. */ public Instance withDnsName(String dnsName) { setDnsName(dnsName); 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; } /** *

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

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

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

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

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

* * @param type * Amazon 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; } /** *

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

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

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

* * @param type * Amazon 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: *

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

*