com.amazonaws.services.deadline.model.FleetSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-deadline Show documentation
/*
* Copyright 2019-2024 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.deadline.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The details of a fleet.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FleetSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Auto Scaling status of a fleet.
*
*/
private String autoScalingStatus;
/**
*
* The configuration details for the fleet.
*
*/
private FleetConfiguration configuration;
/**
*
* The date and time the resource was created.
*
*/
private java.util.Date createdAt;
/**
*
* The user or system that created this resource.
*
*/
private String createdBy;
/**
*
* The display name of the fleet summary to update.
*
*/
private String displayName;
/**
*
* The farm ID.
*
*/
private String farmId;
/**
*
* The fleet ID.
*
*/
private String fleetId;
/**
*
* The maximum number of workers specified in the fleet.
*
*/
private Integer maxWorkerCount;
/**
*
* The minimum number of workers in the fleet.
*
*/
private Integer minWorkerCount;
/**
*
* The status of the fleet.
*
*/
private String status;
/**
*
* The target number of workers in a fleet.
*
*/
private Integer targetWorkerCount;
/**
*
* The date and time the resource was updated.
*
*/
private java.util.Date updatedAt;
/**
*
* The user or system that updated this resource.
*
*/
private String updatedBy;
/**
*
* The number of workers in the fleet summary.
*
*/
private Integer workerCount;
/**
*
* The Auto Scaling status of a fleet.
*
*
* @param autoScalingStatus
* The Auto Scaling status of a fleet.
* @see AutoScalingStatus
*/
public void setAutoScalingStatus(String autoScalingStatus) {
this.autoScalingStatus = autoScalingStatus;
}
/**
*
* The Auto Scaling status of a fleet.
*
*
* @return The Auto Scaling status of a fleet.
* @see AutoScalingStatus
*/
public String getAutoScalingStatus() {
return this.autoScalingStatus;
}
/**
*
* The Auto Scaling status of a fleet.
*
*
* @param autoScalingStatus
* The Auto Scaling status of a fleet.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AutoScalingStatus
*/
public FleetSummary withAutoScalingStatus(String autoScalingStatus) {
setAutoScalingStatus(autoScalingStatus);
return this;
}
/**
*
* The Auto Scaling status of a fleet.
*
*
* @param autoScalingStatus
* The Auto Scaling status of a fleet.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AutoScalingStatus
*/
public FleetSummary withAutoScalingStatus(AutoScalingStatus autoScalingStatus) {
this.autoScalingStatus = autoScalingStatus.toString();
return this;
}
/**
*
* The configuration details for the fleet.
*
*
* @param configuration
* The configuration details for the fleet.
*/
public void setConfiguration(FleetConfiguration configuration) {
this.configuration = configuration;
}
/**
*
* The configuration details for the fleet.
*
*
* @return The configuration details for the fleet.
*/
public FleetConfiguration getConfiguration() {
return this.configuration;
}
/**
*
* The configuration details for the fleet.
*
*
* @param configuration
* The configuration details for the fleet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withConfiguration(FleetConfiguration configuration) {
setConfiguration(configuration);
return this;
}
/**
*
* The date and time the resource was created.
*
*
* @param createdAt
* The date and time the resource was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The date and time the resource was created.
*
*
* @return The date and time the resource was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The date and time the resource was created.
*
*
* @param createdAt
* The date and time the resource was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The user or system that created this resource.
*
*
* @param createdBy
* The user or system that created this resource.
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
*
* The user or system that created this resource.
*
*
* @return The user or system that created this resource.
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
*
* The user or system that created this resource.
*
*
* @param createdBy
* The user or system that created this resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withCreatedBy(String createdBy) {
setCreatedBy(createdBy);
return this;
}
/**
*
* The display name of the fleet summary to update.
*
*
* @param displayName
* The display name of the fleet summary to update.
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
*
* The display name of the fleet summary to update.
*
*
* @return The display name of the fleet summary to update.
*/
public String getDisplayName() {
return this.displayName;
}
/**
*
* The display name of the fleet summary to update.
*
*
* @param displayName
* The display name of the fleet summary to update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withDisplayName(String displayName) {
setDisplayName(displayName);
return this;
}
/**
*
* The farm ID.
*
*
* @param farmId
* The farm ID.
*/
public void setFarmId(String farmId) {
this.farmId = farmId;
}
/**
*
* The farm ID.
*
*
* @return The farm ID.
*/
public String getFarmId() {
return this.farmId;
}
/**
*
* The farm ID.
*
*
* @param farmId
* The farm ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withFarmId(String farmId) {
setFarmId(farmId);
return this;
}
/**
*
* The fleet ID.
*
*
* @param fleetId
* The fleet ID.
*/
public void setFleetId(String fleetId) {
this.fleetId = fleetId;
}
/**
*
* The fleet ID.
*
*
* @return The fleet ID.
*/
public String getFleetId() {
return this.fleetId;
}
/**
*
* The fleet ID.
*
*
* @param fleetId
* The fleet ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withFleetId(String fleetId) {
setFleetId(fleetId);
return this;
}
/**
*
* The maximum number of workers specified in the fleet.
*
*
* @param maxWorkerCount
* The maximum number of workers specified in the fleet.
*/
public void setMaxWorkerCount(Integer maxWorkerCount) {
this.maxWorkerCount = maxWorkerCount;
}
/**
*
* The maximum number of workers specified in the fleet.
*
*
* @return The maximum number of workers specified in the fleet.
*/
public Integer getMaxWorkerCount() {
return this.maxWorkerCount;
}
/**
*
* The maximum number of workers specified in the fleet.
*
*
* @param maxWorkerCount
* The maximum number of workers specified in the fleet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withMaxWorkerCount(Integer maxWorkerCount) {
setMaxWorkerCount(maxWorkerCount);
return this;
}
/**
*
* The minimum number of workers in the fleet.
*
*
* @param minWorkerCount
* The minimum number of workers in the fleet.
*/
public void setMinWorkerCount(Integer minWorkerCount) {
this.minWorkerCount = minWorkerCount;
}
/**
*
* The minimum number of workers in the fleet.
*
*
* @return The minimum number of workers in the fleet.
*/
public Integer getMinWorkerCount() {
return this.minWorkerCount;
}
/**
*
* The minimum number of workers in the fleet.
*
*
* @param minWorkerCount
* The minimum number of workers in the fleet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withMinWorkerCount(Integer minWorkerCount) {
setMinWorkerCount(minWorkerCount);
return this;
}
/**
*
* The status of the fleet.
*
*
* @param status
* The status of the fleet.
* @see FleetStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the fleet.
*
*
* @return The status of the fleet.
* @see FleetStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the fleet.
*
*
* @param status
* The status of the fleet.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FleetStatus
*/
public FleetSummary withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the fleet.
*
*
* @param status
* The status of the fleet.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FleetStatus
*/
public FleetSummary withStatus(FleetStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The target number of workers in a fleet.
*
*
* @param targetWorkerCount
* The target number of workers in a fleet.
*/
public void setTargetWorkerCount(Integer targetWorkerCount) {
this.targetWorkerCount = targetWorkerCount;
}
/**
*
* The target number of workers in a fleet.
*
*
* @return The target number of workers in a fleet.
*/
public Integer getTargetWorkerCount() {
return this.targetWorkerCount;
}
/**
*
* The target number of workers in a fleet.
*
*
* @param targetWorkerCount
* The target number of workers in a fleet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withTargetWorkerCount(Integer targetWorkerCount) {
setTargetWorkerCount(targetWorkerCount);
return this;
}
/**
*
* The date and time the resource was updated.
*
*
* @param updatedAt
* The date and time the resource was updated.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The date and time the resource was updated.
*
*
* @return The date and time the resource was updated.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The date and time the resource was updated.
*
*
* @param updatedAt
* The date and time the resource was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
return this;
}
/**
*
* The user or system that updated this resource.
*
*
* @param updatedBy
* The user or system that updated this resource.
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
*
* The user or system that updated this resource.
*
*
* @return The user or system that updated this resource.
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
*
* The user or system that updated this resource.
*
*
* @param updatedBy
* The user or system that updated this resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withUpdatedBy(String updatedBy) {
setUpdatedBy(updatedBy);
return this;
}
/**
*
* The number of workers in the fleet summary.
*
*
* @param workerCount
* The number of workers in the fleet summary.
*/
public void setWorkerCount(Integer workerCount) {
this.workerCount = workerCount;
}
/**
*
* The number of workers in the fleet summary.
*
*
* @return The number of workers in the fleet summary.
*/
public Integer getWorkerCount() {
return this.workerCount;
}
/**
*
* The number of workers in the fleet summary.
*
*
* @param workerCount
* The number of workers in the fleet summary.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FleetSummary withWorkerCount(Integer workerCount) {
setWorkerCount(workerCount);
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 (getAutoScalingStatus() != null)
sb.append("AutoScalingStatus: ").append(getAutoScalingStatus()).append(",");
if (getConfiguration() != null)
sb.append("Configuration: ").append(getConfiguration()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getCreatedBy() != null)
sb.append("CreatedBy: ").append(getCreatedBy()).append(",");
if (getDisplayName() != null)
sb.append("DisplayName: ").append(getDisplayName()).append(",");
if (getFarmId() != null)
sb.append("FarmId: ").append(getFarmId()).append(",");
if (getFleetId() != null)
sb.append("FleetId: ").append(getFleetId()).append(",");
if (getMaxWorkerCount() != null)
sb.append("MaxWorkerCount: ").append(getMaxWorkerCount()).append(",");
if (getMinWorkerCount() != null)
sb.append("MinWorkerCount: ").append(getMinWorkerCount()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getTargetWorkerCount() != null)
sb.append("TargetWorkerCount: ").append(getTargetWorkerCount()).append(",");
if (getUpdatedAt() != null)
sb.append("UpdatedAt: ").append(getUpdatedAt()).append(",");
if (getUpdatedBy() != null)
sb.append("UpdatedBy: ").append(getUpdatedBy()).append(",");
if (getWorkerCount() != null)
sb.append("WorkerCount: ").append(getWorkerCount());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof FleetSummary == false)
return false;
FleetSummary other = (FleetSummary) obj;
if (other.getAutoScalingStatus() == null ^ this.getAutoScalingStatus() == null)
return false;
if (other.getAutoScalingStatus() != null && other.getAutoScalingStatus().equals(this.getAutoScalingStatus()) == false)
return false;
if (other.getConfiguration() == null ^ this.getConfiguration() == null)
return false;
if (other.getConfiguration() != null && other.getConfiguration().equals(this.getConfiguration()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getCreatedBy() == null ^ this.getCreatedBy() == null)
return false;
if (other.getCreatedBy() != null && other.getCreatedBy().equals(this.getCreatedBy()) == false)
return false;
if (other.getDisplayName() == null ^ this.getDisplayName() == null)
return false;
if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false)
return false;
if (other.getFarmId() == null ^ this.getFarmId() == null)
return false;
if (other.getFarmId() != null && other.getFarmId().equals(this.getFarmId()) == false)
return false;
if (other.getFleetId() == null ^ this.getFleetId() == null)
return false;
if (other.getFleetId() != null && other.getFleetId().equals(this.getFleetId()) == false)
return false;
if (other.getMaxWorkerCount() == null ^ this.getMaxWorkerCount() == null)
return false;
if (other.getMaxWorkerCount() != null && other.getMaxWorkerCount().equals(this.getMaxWorkerCount()) == false)
return false;
if (other.getMinWorkerCount() == null ^ this.getMinWorkerCount() == null)
return false;
if (other.getMinWorkerCount() != null && other.getMinWorkerCount().equals(this.getMinWorkerCount()) == 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.getTargetWorkerCount() == null ^ this.getTargetWorkerCount() == null)
return false;
if (other.getTargetWorkerCount() != null && other.getTargetWorkerCount().equals(this.getTargetWorkerCount()) == false)
return false;
if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null)
return false;
if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false)
return false;
if (other.getUpdatedBy() == null ^ this.getUpdatedBy() == null)
return false;
if (other.getUpdatedBy() != null && other.getUpdatedBy().equals(this.getUpdatedBy()) == false)
return false;
if (other.getWorkerCount() == null ^ this.getWorkerCount() == null)
return false;
if (other.getWorkerCount() != null && other.getWorkerCount().equals(this.getWorkerCount()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAutoScalingStatus() == null) ? 0 : getAutoScalingStatus().hashCode());
hashCode = prime * hashCode + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
hashCode = prime * hashCode + ((getFarmId() == null) ? 0 : getFarmId().hashCode());
hashCode = prime * hashCode + ((getFleetId() == null) ? 0 : getFleetId().hashCode());
hashCode = prime * hashCode + ((getMaxWorkerCount() == null) ? 0 : getMaxWorkerCount().hashCode());
hashCode = prime * hashCode + ((getMinWorkerCount() == null) ? 0 : getMinWorkerCount().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getTargetWorkerCount() == null) ? 0 : getTargetWorkerCount().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
hashCode = prime * hashCode + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
hashCode = prime * hashCode + ((getWorkerCount() == null) ? 0 : getWorkerCount().hashCode());
return hashCode;
}
@Override
public FleetSummary clone() {
try {
return (FleetSummary) 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.deadline.model.transform.FleetSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}