com.amazonaws.services.forecast.model.DescribeWhatIfAnalysisResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-forecast 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.forecast.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeWhatIfAnalysisResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The name of the what-if analysis.
*
*/
private String whatIfAnalysisName;
/**
*
* The Amazon Resource Name (ARN) of the what-if analysis.
*
*/
private String whatIfAnalysisArn;
/**
*
* The Amazon Resource Name (ARN) of the what-if forecast.
*
*/
private String forecastArn;
/**
*
* The approximate time remaining to complete the what-if analysis, in minutes.
*
*/
private Long estimatedTimeRemainingInMinutes;
/**
*
* The status of the what-if analysis. States include:
*
*
* -
*
* ACTIVE
*
*
* -
*
* CREATE_PENDING
, CREATE_IN_PROGRESS
, CREATE_FAILED
*
*
* -
*
* CREATE_STOPPING
, CREATE_STOPPED
*
*
* -
*
* DELETE_PENDING
, DELETE_IN_PROGRESS
, DELETE_FAILED
*
*
*
*
*
* The Status
of the what-if analysis must be ACTIVE
before you can access the analysis.
*
*
*/
private String status;
/**
*
* If an error occurred, an informational message about the error.
*
*/
private String message;
/**
*
* When the what-if analysis was created.
*
*/
private java.util.Date creationTime;
/**
*
* The last time the resource was modified. The timestamp depends on the status of the job:
*
*
* -
*
* CREATE_PENDING
- The CreationTime
.
*
*
* -
*
* CREATE_IN_PROGRESS
- The current timestamp.
*
*
* -
*
* CREATE_STOPPING
- The current timestamp.
*
*
* -
*
* CREATE_STOPPED
- When the job stopped.
*
*
* -
*
* ACTIVE
or CREATE_FAILED
- When the job finished or failed.
*
*
*
*/
private java.util.Date lastModificationTime;
private TimeSeriesSelector timeSeriesSelector;
/**
*
* The name of the what-if analysis.
*
*
* @param whatIfAnalysisName
* The name of the what-if analysis.
*/
public void setWhatIfAnalysisName(String whatIfAnalysisName) {
this.whatIfAnalysisName = whatIfAnalysisName;
}
/**
*
* The name of the what-if analysis.
*
*
* @return The name of the what-if analysis.
*/
public String getWhatIfAnalysisName() {
return this.whatIfAnalysisName;
}
/**
*
* The name of the what-if analysis.
*
*
* @param whatIfAnalysisName
* The name of the what-if analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWhatIfAnalysisResult withWhatIfAnalysisName(String whatIfAnalysisName) {
setWhatIfAnalysisName(whatIfAnalysisName);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the what-if analysis.
*
*
* @param whatIfAnalysisArn
* The Amazon Resource Name (ARN) of the what-if analysis.
*/
public void setWhatIfAnalysisArn(String whatIfAnalysisArn) {
this.whatIfAnalysisArn = whatIfAnalysisArn;
}
/**
*
* The Amazon Resource Name (ARN) of the what-if analysis.
*
*
* @return The Amazon Resource Name (ARN) of the what-if analysis.
*/
public String getWhatIfAnalysisArn() {
return this.whatIfAnalysisArn;
}
/**
*
* The Amazon Resource Name (ARN) of the what-if analysis.
*
*
* @param whatIfAnalysisArn
* The Amazon Resource Name (ARN) of the what-if analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWhatIfAnalysisResult withWhatIfAnalysisArn(String whatIfAnalysisArn) {
setWhatIfAnalysisArn(whatIfAnalysisArn);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the what-if forecast.
*
*
* @param forecastArn
* The Amazon Resource Name (ARN) of the what-if forecast.
*/
public void setForecastArn(String forecastArn) {
this.forecastArn = forecastArn;
}
/**
*
* The Amazon Resource Name (ARN) of the what-if forecast.
*
*
* @return The Amazon Resource Name (ARN) of the what-if forecast.
*/
public String getForecastArn() {
return this.forecastArn;
}
/**
*
* The Amazon Resource Name (ARN) of the what-if forecast.
*
*
* @param forecastArn
* The Amazon Resource Name (ARN) of the what-if forecast.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWhatIfAnalysisResult withForecastArn(String forecastArn) {
setForecastArn(forecastArn);
return this;
}
/**
*
* The approximate time remaining to complete the what-if analysis, in minutes.
*
*
* @param estimatedTimeRemainingInMinutes
* The approximate time remaining to complete the what-if analysis, in minutes.
*/
public void setEstimatedTimeRemainingInMinutes(Long estimatedTimeRemainingInMinutes) {
this.estimatedTimeRemainingInMinutes = estimatedTimeRemainingInMinutes;
}
/**
*
* The approximate time remaining to complete the what-if analysis, in minutes.
*
*
* @return The approximate time remaining to complete the what-if analysis, in minutes.
*/
public Long getEstimatedTimeRemainingInMinutes() {
return this.estimatedTimeRemainingInMinutes;
}
/**
*
* The approximate time remaining to complete the what-if analysis, in minutes.
*
*
* @param estimatedTimeRemainingInMinutes
* The approximate time remaining to complete the what-if analysis, in minutes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWhatIfAnalysisResult withEstimatedTimeRemainingInMinutes(Long estimatedTimeRemainingInMinutes) {
setEstimatedTimeRemainingInMinutes(estimatedTimeRemainingInMinutes);
return this;
}
/**
*
* The status of the what-if analysis. States include:
*
*
* -
*
* ACTIVE
*
*
* -
*
* CREATE_PENDING
, CREATE_IN_PROGRESS
, CREATE_FAILED
*
*
* -
*
* CREATE_STOPPING
, CREATE_STOPPED
*
*
* -
*
* DELETE_PENDING
, DELETE_IN_PROGRESS
, DELETE_FAILED
*
*
*
*
*
* The Status
of the what-if analysis must be ACTIVE
before you can access the analysis.
*
*
*
* @param status
* The status of the what-if analysis. States include:
*
* -
*
* ACTIVE
*
*
* -
*
* CREATE_PENDING
, CREATE_IN_PROGRESS
, CREATE_FAILED
*
*
* -
*
* CREATE_STOPPING
, CREATE_STOPPED
*
*
* -
*
* DELETE_PENDING
, DELETE_IN_PROGRESS
, DELETE_FAILED
*
*
*
*
*
* The Status
of the what-if analysis must be ACTIVE
before you can access the
* analysis.
*
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the what-if analysis. States include:
*
*
* -
*
* ACTIVE
*
*
* -
*
* CREATE_PENDING
, CREATE_IN_PROGRESS
, CREATE_FAILED
*
*
* -
*
* CREATE_STOPPING
, CREATE_STOPPED
*
*
* -
*
* DELETE_PENDING
, DELETE_IN_PROGRESS
, DELETE_FAILED
*
*
*
*
*
* The Status
of the what-if analysis must be ACTIVE
before you can access the analysis.
*
*
*
* @return The status of the what-if analysis. States include:
*
* -
*
* ACTIVE
*
*
* -
*
* CREATE_PENDING
, CREATE_IN_PROGRESS
, CREATE_FAILED
*
*
* -
*
* CREATE_STOPPING
, CREATE_STOPPED
*
*
* -
*
* DELETE_PENDING
, DELETE_IN_PROGRESS
, DELETE_FAILED
*
*
*
*
*
* The Status
of the what-if analysis must be ACTIVE
before you can access the
* analysis.
*
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the what-if analysis. States include:
*
*
* -
*
* ACTIVE
*
*
* -
*
* CREATE_PENDING
, CREATE_IN_PROGRESS
, CREATE_FAILED
*
*
* -
*
* CREATE_STOPPING
, CREATE_STOPPED
*
*
* -
*
* DELETE_PENDING
, DELETE_IN_PROGRESS
, DELETE_FAILED
*
*
*
*
*
* The Status
of the what-if analysis must be ACTIVE
before you can access the analysis.
*
*
*
* @param status
* The status of the what-if analysis. States include:
*
* -
*
* ACTIVE
*
*
* -
*
* CREATE_PENDING
, CREATE_IN_PROGRESS
, CREATE_FAILED
*
*
* -
*
* CREATE_STOPPING
, CREATE_STOPPED
*
*
* -
*
* DELETE_PENDING
, DELETE_IN_PROGRESS
, DELETE_FAILED
*
*
*
*
*
* The Status
of the what-if analysis must be ACTIVE
before you can access the
* analysis.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWhatIfAnalysisResult withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* If an error occurred, an informational message about the error.
*
*
* @param message
* If an error occurred, an informational message about the error.
*/
public void setMessage(String message) {
this.message = message;
}
/**
*
* If an error occurred, an informational message about the error.
*
*
* @return If an error occurred, an informational message about the error.
*/
public String getMessage() {
return this.message;
}
/**
*
* If an error occurred, an informational message about the error.
*
*
* @param message
* If an error occurred, an informational message about the error.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWhatIfAnalysisResult withMessage(String message) {
setMessage(message);
return this;
}
/**
*
* When the what-if analysis was created.
*
*
* @param creationTime
* When the what-if analysis was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* When the what-if analysis was created.
*
*
* @return When the what-if analysis was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* When the what-if analysis was created.
*
*
* @param creationTime
* When the what-if analysis was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWhatIfAnalysisResult withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The last time the resource was modified. The timestamp depends on the status of the job:
*
*
* -
*
* CREATE_PENDING
- The CreationTime
.
*
*
* -
*
* CREATE_IN_PROGRESS
- The current timestamp.
*
*
* -
*
* CREATE_STOPPING
- The current timestamp.
*
*
* -
*
* CREATE_STOPPED
- When the job stopped.
*
*
* -
*
* ACTIVE
or CREATE_FAILED
- When the job finished or failed.
*
*
*
*
* @param lastModificationTime
* The last time the resource was modified. The timestamp depends on the status of the job:
*
* -
*
* CREATE_PENDING
- The CreationTime
.
*
*
* -
*
* CREATE_IN_PROGRESS
- The current timestamp.
*
*
* -
*
* CREATE_STOPPING
- The current timestamp.
*
*
* -
*
* CREATE_STOPPED
- When the job stopped.
*
*
* -
*
* ACTIVE
or CREATE_FAILED
- When the job finished or failed.
*
*
*/
public void setLastModificationTime(java.util.Date lastModificationTime) {
this.lastModificationTime = lastModificationTime;
}
/**
*
* The last time the resource was modified. The timestamp depends on the status of the job:
*
*
* -
*
* CREATE_PENDING
- The CreationTime
.
*
*
* -
*
* CREATE_IN_PROGRESS
- The current timestamp.
*
*
* -
*
* CREATE_STOPPING
- The current timestamp.
*
*
* -
*
* CREATE_STOPPED
- When the job stopped.
*
*
* -
*
* ACTIVE
or CREATE_FAILED
- When the job finished or failed.
*
*
*
*
* @return The last time the resource was modified. The timestamp depends on the status of the job:
*
* -
*
* CREATE_PENDING
- The CreationTime
.
*
*
* -
*
* CREATE_IN_PROGRESS
- The current timestamp.
*
*
* -
*
* CREATE_STOPPING
- The current timestamp.
*
*
* -
*
* CREATE_STOPPED
- When the job stopped.
*
*
* -
*
* ACTIVE
or CREATE_FAILED
- When the job finished or failed.
*
*
*/
public java.util.Date getLastModificationTime() {
return this.lastModificationTime;
}
/**
*
* The last time the resource was modified. The timestamp depends on the status of the job:
*
*
* -
*
* CREATE_PENDING
- The CreationTime
.
*
*
* -
*
* CREATE_IN_PROGRESS
- The current timestamp.
*
*
* -
*
* CREATE_STOPPING
- The current timestamp.
*
*
* -
*
* CREATE_STOPPED
- When the job stopped.
*
*
* -
*
* ACTIVE
or CREATE_FAILED
- When the job finished or failed.
*
*
*
*
* @param lastModificationTime
* The last time the resource was modified. The timestamp depends on the status of the job:
*
* -
*
* CREATE_PENDING
- The CreationTime
.
*
*
* -
*
* CREATE_IN_PROGRESS
- The current timestamp.
*
*
* -
*
* CREATE_STOPPING
- The current timestamp.
*
*
* -
*
* CREATE_STOPPED
- When the job stopped.
*
*
* -
*
* ACTIVE
or CREATE_FAILED
- When the job finished or failed.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWhatIfAnalysisResult withLastModificationTime(java.util.Date lastModificationTime) {
setLastModificationTime(lastModificationTime);
return this;
}
/**
* @param timeSeriesSelector
*/
public void setTimeSeriesSelector(TimeSeriesSelector timeSeriesSelector) {
this.timeSeriesSelector = timeSeriesSelector;
}
/**
* @return
*/
public TimeSeriesSelector getTimeSeriesSelector() {
return this.timeSeriesSelector;
}
/**
* @param timeSeriesSelector
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeWhatIfAnalysisResult withTimeSeriesSelector(TimeSeriesSelector timeSeriesSelector) {
setTimeSeriesSelector(timeSeriesSelector);
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 (getWhatIfAnalysisName() != null)
sb.append("WhatIfAnalysisName: ").append(getWhatIfAnalysisName()).append(",");
if (getWhatIfAnalysisArn() != null)
sb.append("WhatIfAnalysisArn: ").append(getWhatIfAnalysisArn()).append(",");
if (getForecastArn() != null)
sb.append("ForecastArn: ").append(getForecastArn()).append(",");
if (getEstimatedTimeRemainingInMinutes() != null)
sb.append("EstimatedTimeRemainingInMinutes: ").append(getEstimatedTimeRemainingInMinutes()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getMessage() != null)
sb.append("Message: ").append(getMessage()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastModificationTime() != null)
sb.append("LastModificationTime: ").append(getLastModificationTime()).append(",");
if (getTimeSeriesSelector() != null)
sb.append("TimeSeriesSelector: ").append(getTimeSeriesSelector());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeWhatIfAnalysisResult == false)
return false;
DescribeWhatIfAnalysisResult other = (DescribeWhatIfAnalysisResult) obj;
if (other.getWhatIfAnalysisName() == null ^ this.getWhatIfAnalysisName() == null)
return false;
if (other.getWhatIfAnalysisName() != null && other.getWhatIfAnalysisName().equals(this.getWhatIfAnalysisName()) == false)
return false;
if (other.getWhatIfAnalysisArn() == null ^ this.getWhatIfAnalysisArn() == null)
return false;
if (other.getWhatIfAnalysisArn() != null && other.getWhatIfAnalysisArn().equals(this.getWhatIfAnalysisArn()) == false)
return false;
if (other.getForecastArn() == null ^ this.getForecastArn() == null)
return false;
if (other.getForecastArn() != null && other.getForecastArn().equals(this.getForecastArn()) == false)
return false;
if (other.getEstimatedTimeRemainingInMinutes() == null ^ this.getEstimatedTimeRemainingInMinutes() == null)
return false;
if (other.getEstimatedTimeRemainingInMinutes() != null
&& other.getEstimatedTimeRemainingInMinutes().equals(this.getEstimatedTimeRemainingInMinutes()) == 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.getMessage() == null ^ this.getMessage() == null)
return false;
if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == 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.getLastModificationTime() == null ^ this.getLastModificationTime() == null)
return false;
if (other.getLastModificationTime() != null && other.getLastModificationTime().equals(this.getLastModificationTime()) == false)
return false;
if (other.getTimeSeriesSelector() == null ^ this.getTimeSeriesSelector() == null)
return false;
if (other.getTimeSeriesSelector() != null && other.getTimeSeriesSelector().equals(this.getTimeSeriesSelector()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getWhatIfAnalysisName() == null) ? 0 : getWhatIfAnalysisName().hashCode());
hashCode = prime * hashCode + ((getWhatIfAnalysisArn() == null) ? 0 : getWhatIfAnalysisArn().hashCode());
hashCode = prime * hashCode + ((getForecastArn() == null) ? 0 : getForecastArn().hashCode());
hashCode = prime * hashCode + ((getEstimatedTimeRemainingInMinutes() == null) ? 0 : getEstimatedTimeRemainingInMinutes().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastModificationTime() == null) ? 0 : getLastModificationTime().hashCode());
hashCode = prime * hashCode + ((getTimeSeriesSelector() == null) ? 0 : getTimeSeriesSelector().hashCode());
return hashCode;
}
@Override
public DescribeWhatIfAnalysisResult clone() {
try {
return (DescribeWhatIfAnalysisResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}