com.amazonaws.services.migrationhubstrategyrecommendations.model.DataCollectionDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-migrationhubstrategyrecommendations 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.migrationhubstrategyrecommendations.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Detailed information about an assessment.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DataCollectionDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The time the assessment completes.
*
*/
private java.util.Date completionTime;
/**
*
* The number of failed servers in the assessment.
*
*/
private Integer failed;
/**
*
* The number of servers with the assessment status IN_PROGESS
.
*
*/
private Integer inProgress;
/**
*
* The total number of servers in the assessment.
*
*/
private Integer servers;
/**
*
* The start time of assessment.
*
*/
private java.util.Date startTime;
/**
*
* The status of the assessment.
*
*/
private String status;
/**
*
* The status message of the assessment.
*
*/
private String statusMessage;
/**
*
* The number of successful servers in the assessment.
*
*/
private Integer success;
/**
*
* The time the assessment completes.
*
*
* @param completionTime
* The time the assessment completes.
*/
public void setCompletionTime(java.util.Date completionTime) {
this.completionTime = completionTime;
}
/**
*
* The time the assessment completes.
*
*
* @return The time the assessment completes.
*/
public java.util.Date getCompletionTime() {
return this.completionTime;
}
/**
*
* The time the assessment completes.
*
*
* @param completionTime
* The time the assessment completes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataCollectionDetails withCompletionTime(java.util.Date completionTime) {
setCompletionTime(completionTime);
return this;
}
/**
*
* The number of failed servers in the assessment.
*
*
* @param failed
* The number of failed servers in the assessment.
*/
public void setFailed(Integer failed) {
this.failed = failed;
}
/**
*
* The number of failed servers in the assessment.
*
*
* @return The number of failed servers in the assessment.
*/
public Integer getFailed() {
return this.failed;
}
/**
*
* The number of failed servers in the assessment.
*
*
* @param failed
* The number of failed servers in the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataCollectionDetails withFailed(Integer failed) {
setFailed(failed);
return this;
}
/**
*
* The number of servers with the assessment status IN_PROGESS
.
*
*
* @param inProgress
* The number of servers with the assessment status IN_PROGESS
.
*/
public void setInProgress(Integer inProgress) {
this.inProgress = inProgress;
}
/**
*
* The number of servers with the assessment status IN_PROGESS
.
*
*
* @return The number of servers with the assessment status IN_PROGESS
.
*/
public Integer getInProgress() {
return this.inProgress;
}
/**
*
* The number of servers with the assessment status IN_PROGESS
.
*
*
* @param inProgress
* The number of servers with the assessment status IN_PROGESS
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataCollectionDetails withInProgress(Integer inProgress) {
setInProgress(inProgress);
return this;
}
/**
*
* The total number of servers in the assessment.
*
*
* @param servers
* The total number of servers in the assessment.
*/
public void setServers(Integer servers) {
this.servers = servers;
}
/**
*
* The total number of servers in the assessment.
*
*
* @return The total number of servers in the assessment.
*/
public Integer getServers() {
return this.servers;
}
/**
*
* The total number of servers in the assessment.
*
*
* @param servers
* The total number of servers in the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataCollectionDetails withServers(Integer servers) {
setServers(servers);
return this;
}
/**
*
* The start time of assessment.
*
*
* @param startTime
* The start time of assessment.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* The start time of assessment.
*
*
* @return The start time of assessment.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* The start time of assessment.
*
*
* @param startTime
* The start time of assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataCollectionDetails withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* The status of the assessment.
*
*
* @param status
* The status of the assessment.
* @see AssessmentStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the assessment.
*
*
* @return The status of the assessment.
* @see AssessmentStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the assessment.
*
*
* @param status
* The status of the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AssessmentStatus
*/
public DataCollectionDetails withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the assessment.
*
*
* @param status
* The status of the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AssessmentStatus
*/
public DataCollectionDetails withStatus(AssessmentStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The status message of the assessment.
*
*
* @param statusMessage
* The status message of the assessment.
*/
public void setStatusMessage(String statusMessage) {
this.statusMessage = statusMessage;
}
/**
*
* The status message of the assessment.
*
*
* @return The status message of the assessment.
*/
public String getStatusMessage() {
return this.statusMessage;
}
/**
*
* The status message of the assessment.
*
*
* @param statusMessage
* The status message of the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataCollectionDetails withStatusMessage(String statusMessage) {
setStatusMessage(statusMessage);
return this;
}
/**
*
* The number of successful servers in the assessment.
*
*
* @param success
* The number of successful servers in the assessment.
*/
public void setSuccess(Integer success) {
this.success = success;
}
/**
*
* The number of successful servers in the assessment.
*
*
* @return The number of successful servers in the assessment.
*/
public Integer getSuccess() {
return this.success;
}
/**
*
* The number of successful servers in the assessment.
*
*
* @param success
* The number of successful servers in the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataCollectionDetails withSuccess(Integer success) {
setSuccess(success);
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 (getCompletionTime() != null)
sb.append("CompletionTime: ").append(getCompletionTime()).append(",");
if (getFailed() != null)
sb.append("Failed: ").append(getFailed()).append(",");
if (getInProgress() != null)
sb.append("InProgress: ").append(getInProgress()).append(",");
if (getServers() != null)
sb.append("Servers: ").append(getServers()).append(",");
if (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getStatusMessage() != null)
sb.append("StatusMessage: ").append(getStatusMessage()).append(",");
if (getSuccess() != null)
sb.append("Success: ").append(getSuccess());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DataCollectionDetails == false)
return false;
DataCollectionDetails other = (DataCollectionDetails) obj;
if (other.getCompletionTime() == null ^ this.getCompletionTime() == null)
return false;
if (other.getCompletionTime() != null && other.getCompletionTime().equals(this.getCompletionTime()) == false)
return false;
if (other.getFailed() == null ^ this.getFailed() == null)
return false;
if (other.getFailed() != null && other.getFailed().equals(this.getFailed()) == false)
return false;
if (other.getInProgress() == null ^ this.getInProgress() == null)
return false;
if (other.getInProgress() != null && other.getInProgress().equals(this.getInProgress()) == false)
return false;
if (other.getServers() == null ^ this.getServers() == null)
return false;
if (other.getServers() != null && other.getServers().equals(this.getServers()) == false)
return false;
if (other.getStartTime() == null ^ this.getStartTime() == null)
return false;
if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == 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.getStatusMessage() == null ^ this.getStatusMessage() == null)
return false;
if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false)
return false;
if (other.getSuccess() == null ^ this.getSuccess() == null)
return false;
if (other.getSuccess() != null && other.getSuccess().equals(this.getSuccess()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCompletionTime() == null) ? 0 : getCompletionTime().hashCode());
hashCode = prime * hashCode + ((getFailed() == null) ? 0 : getFailed().hashCode());
hashCode = prime * hashCode + ((getInProgress() == null) ? 0 : getInProgress().hashCode());
hashCode = prime * hashCode + ((getServers() == null) ? 0 : getServers().hashCode());
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode());
hashCode = prime * hashCode + ((getSuccess() == null) ? 0 : getSuccess().hashCode());
return hashCode;
}
@Override
public DataCollectionDetails clone() {
try {
return (DataCollectionDetails) 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.migrationhubstrategyrecommendations.model.transform.DataCollectionDetailsMarshaller.getInstance().marshall(this,
protocolMarshaller);
}
}