
com.amazonaws.services.gamelift.model.Alias Maven / Gradle / Ivy
Show all versions of aws-java-sdk-gamelift Show documentation
/*
* Copyright 2011-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 fleet alias.
*
*/
public class Alias implements Serializable, Cloneable {
/**
*
* Unique identifier for a fleet alias.
*
*/
private String aliasId;
/**
*
* Descriptive label associated with an alias. Alias names do not need to be
* unique.
*
*/
private String name;
/**
*
* Human-readable description of an alias.
*
*/
private String description;
private RoutingStrategy routingStrategy;
/**
*
* Time stamp indicating when this data object was created. Format is a
* number expressed in Unix time as milliseconds (ex: "1469498468.057".
*
*/
private java.util.Date creationTime;
/**
*
* Time stamp indicating when this data object was last modified. Format is
* a number expressed in Unix time as milliseconds (ex: "1469498468.057".
*
*/
private java.util.Date lastUpdatedTime;
/**
*
* Unique identifier for a fleet alias.
*
*
* @param aliasId
* Unique identifier for a fleet alias.
*/
public void setAliasId(String aliasId) {
this.aliasId = aliasId;
}
/**
*
* Unique identifier for a fleet alias.
*
*
* @return Unique identifier for a fleet alias.
*/
public String getAliasId() {
return this.aliasId;
}
/**
*
* Unique identifier for a fleet alias.
*
*
* @param aliasId
* Unique identifier for a fleet alias.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public Alias withAliasId(String aliasId) {
setAliasId(aliasId);
return this;
}
/**
*
* Descriptive label associated with an alias. Alias names do not need to be
* unique.
*
*
* @param name
* Descriptive label associated with an alias. Alias names do not
* need to be unique.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* Descriptive label associated with an alias. Alias names do not need to be
* unique.
*
*
* @return Descriptive label associated with an alias. Alias names do not
* need to be unique.
*/
public String getName() {
return this.name;
}
/**
*
* Descriptive label associated with an alias. Alias names do not need to be
* unique.
*
*
* @param name
* Descriptive label associated with an alias. Alias names do not
* need to be unique.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public Alias withName(String name) {
setName(name);
return this;
}
/**
*
* Human-readable description of an alias.
*
*
* @param description
* Human-readable description of an alias.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* Human-readable description of an alias.
*
*
* @return Human-readable description of an alias.
*/
public String getDescription() {
return this.description;
}
/**
*
* Human-readable description of an alias.
*
*
* @param description
* Human-readable description of an alias.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public Alias withDescription(String description) {
setDescription(description);
return this;
}
/**
* @param routingStrategy
*/
public void setRoutingStrategy(RoutingStrategy routingStrategy) {
this.routingStrategy = routingStrategy;
}
/**
* @return
*/
public RoutingStrategy getRoutingStrategy() {
return this.routingStrategy;
}
/**
* @param routingStrategy
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public Alias withRoutingStrategy(RoutingStrategy routingStrategy) {
setRoutingStrategy(routingStrategy);
return this;
}
/**
*
* Time stamp indicating when this data object was created. Format is a
* number expressed in Unix time as milliseconds (ex: "1469498468.057".
*
*
* @param creationTime
* Time stamp indicating when this data object was created. Format is
* a number expressed in Unix time as milliseconds (ex:
* "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 (ex: "1469498468.057".
*
*
* @return Time stamp indicating when this data object was created. Format
* is a number expressed in Unix time as milliseconds (ex:
* "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 (ex: "1469498468.057".
*
*
* @param creationTime
* Time stamp indicating when this data object was created. Format is
* a number expressed in Unix time as milliseconds (ex:
* "1469498468.057".
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public Alias withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* Time stamp indicating when this data object was last modified. Format is
* a number expressed in Unix time as milliseconds (ex: "1469498468.057".
*
*
* @param lastUpdatedTime
* Time stamp indicating when this data object was last modified.
* Format is a number expressed in Unix time as milliseconds (ex:
* "1469498468.057".
*/
public void setLastUpdatedTime(java.util.Date lastUpdatedTime) {
this.lastUpdatedTime = lastUpdatedTime;
}
/**
*
* Time stamp indicating when this data object was last modified. Format is
* a number expressed in Unix time as milliseconds (ex: "1469498468.057".
*
*
* @return Time stamp indicating when this data object was last modified.
* Format is a number expressed in Unix time as milliseconds (ex:
* "1469498468.057".
*/
public java.util.Date getLastUpdatedTime() {
return this.lastUpdatedTime;
}
/**
*
* Time stamp indicating when this data object was last modified. Format is
* a number expressed in Unix time as milliseconds (ex: "1469498468.057".
*
*
* @param lastUpdatedTime
* Time stamp indicating when this data object was last modified.
* Format is a number expressed in Unix time as milliseconds (ex:
* "1469498468.057".
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public Alias withLastUpdatedTime(java.util.Date lastUpdatedTime) {
setLastUpdatedTime(lastUpdatedTime);
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 (getAliasId() != null)
sb.append("AliasId: " + getAliasId() + ",");
if (getName() != null)
sb.append("Name: " + getName() + ",");
if (getDescription() != null)
sb.append("Description: " + getDescription() + ",");
if (getRoutingStrategy() != null)
sb.append("RoutingStrategy: " + getRoutingStrategy() + ",");
if (getCreationTime() != null)
sb.append("CreationTime: " + getCreationTime() + ",");
if (getLastUpdatedTime() != null)
sb.append("LastUpdatedTime: " + getLastUpdatedTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Alias == false)
return false;
Alias other = (Alias) obj;
if (other.getAliasId() == null ^ this.getAliasId() == null)
return false;
if (other.getAliasId() != null
&& other.getAliasId().equals(this.getAliasId()) == 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.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null
&& other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getRoutingStrategy() == null
^ this.getRoutingStrategy() == null)
return false;
if (other.getRoutingStrategy() != null
&& other.getRoutingStrategy().equals(this.getRoutingStrategy()) == 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.getLastUpdatedTime() == null
^ this.getLastUpdatedTime() == null)
return false;
if (other.getLastUpdatedTime() != null
&& other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getAliasId() == null) ? 0 : getAliasId().hashCode());
hashCode = prime * hashCode
+ ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime
* hashCode
+ ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime
* hashCode
+ ((getRoutingStrategy() == null) ? 0 : getRoutingStrategy()
.hashCode());
hashCode = prime
* hashCode
+ ((getCreationTime() == null) ? 0 : getCreationTime()
.hashCode());
hashCode = prime
* hashCode
+ ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime()
.hashCode());
return hashCode;
}
@Override
public Alias clone() {
try {
return (Alias) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
}