
com.amazonaws.services.costexplorer.model.ForecastResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-costexplorer Show documentation
/*
* Copyright 2020-2025 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.costexplorer.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The forecast that's created for your query.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ForecastResult implements Serializable, Cloneable, StructuredPojo {
/**
*
* The period of time that the forecast covers.
*
*/
private DateInterval timePeriod;
/**
*
* The mean value of the forecast.
*
*/
private String meanValue;
/**
*
* The lower limit for the prediction interval.
*
*/
private String predictionIntervalLowerBound;
/**
*
* The upper limit for the prediction interval.
*
*/
private String predictionIntervalUpperBound;
/**
*
* The period of time that the forecast covers.
*
*
* @param timePeriod
* The period of time that the forecast covers.
*/
public void setTimePeriod(DateInterval timePeriod) {
this.timePeriod = timePeriod;
}
/**
*
* The period of time that the forecast covers.
*
*
* @return The period of time that the forecast covers.
*/
public DateInterval getTimePeriod() {
return this.timePeriod;
}
/**
*
* The period of time that the forecast covers.
*
*
* @param timePeriod
* The period of time that the forecast covers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ForecastResult withTimePeriod(DateInterval timePeriod) {
setTimePeriod(timePeriod);
return this;
}
/**
*
* The mean value of the forecast.
*
*
* @param meanValue
* The mean value of the forecast.
*/
public void setMeanValue(String meanValue) {
this.meanValue = meanValue;
}
/**
*
* The mean value of the forecast.
*
*
* @return The mean value of the forecast.
*/
public String getMeanValue() {
return this.meanValue;
}
/**
*
* The mean value of the forecast.
*
*
* @param meanValue
* The mean value of the forecast.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ForecastResult withMeanValue(String meanValue) {
setMeanValue(meanValue);
return this;
}
/**
*
* The lower limit for the prediction interval.
*
*
* @param predictionIntervalLowerBound
* The lower limit for the prediction interval.
*/
public void setPredictionIntervalLowerBound(String predictionIntervalLowerBound) {
this.predictionIntervalLowerBound = predictionIntervalLowerBound;
}
/**
*
* The lower limit for the prediction interval.
*
*
* @return The lower limit for the prediction interval.
*/
public String getPredictionIntervalLowerBound() {
return this.predictionIntervalLowerBound;
}
/**
*
* The lower limit for the prediction interval.
*
*
* @param predictionIntervalLowerBound
* The lower limit for the prediction interval.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ForecastResult withPredictionIntervalLowerBound(String predictionIntervalLowerBound) {
setPredictionIntervalLowerBound(predictionIntervalLowerBound);
return this;
}
/**
*
* The upper limit for the prediction interval.
*
*
* @param predictionIntervalUpperBound
* The upper limit for the prediction interval.
*/
public void setPredictionIntervalUpperBound(String predictionIntervalUpperBound) {
this.predictionIntervalUpperBound = predictionIntervalUpperBound;
}
/**
*
* The upper limit for the prediction interval.
*
*
* @return The upper limit for the prediction interval.
*/
public String getPredictionIntervalUpperBound() {
return this.predictionIntervalUpperBound;
}
/**
*
* The upper limit for the prediction interval.
*
*
* @param predictionIntervalUpperBound
* The upper limit for the prediction interval.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ForecastResult withPredictionIntervalUpperBound(String predictionIntervalUpperBound) {
setPredictionIntervalUpperBound(predictionIntervalUpperBound);
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 (getTimePeriod() != null)
sb.append("TimePeriod: ").append(getTimePeriod()).append(",");
if (getMeanValue() != null)
sb.append("MeanValue: ").append(getMeanValue()).append(",");
if (getPredictionIntervalLowerBound() != null)
sb.append("PredictionIntervalLowerBound: ").append(getPredictionIntervalLowerBound()).append(",");
if (getPredictionIntervalUpperBound() != null)
sb.append("PredictionIntervalUpperBound: ").append(getPredictionIntervalUpperBound());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ForecastResult == false)
return false;
ForecastResult other = (ForecastResult) obj;
if (other.getTimePeriod() == null ^ this.getTimePeriod() == null)
return false;
if (other.getTimePeriod() != null && other.getTimePeriod().equals(this.getTimePeriod()) == false)
return false;
if (other.getMeanValue() == null ^ this.getMeanValue() == null)
return false;
if (other.getMeanValue() != null && other.getMeanValue().equals(this.getMeanValue()) == false)
return false;
if (other.getPredictionIntervalLowerBound() == null ^ this.getPredictionIntervalLowerBound() == null)
return false;
if (other.getPredictionIntervalLowerBound() != null && other.getPredictionIntervalLowerBound().equals(this.getPredictionIntervalLowerBound()) == false)
return false;
if (other.getPredictionIntervalUpperBound() == null ^ this.getPredictionIntervalUpperBound() == null)
return false;
if (other.getPredictionIntervalUpperBound() != null && other.getPredictionIntervalUpperBound().equals(this.getPredictionIntervalUpperBound()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTimePeriod() == null) ? 0 : getTimePeriod().hashCode());
hashCode = prime * hashCode + ((getMeanValue() == null) ? 0 : getMeanValue().hashCode());
hashCode = prime * hashCode + ((getPredictionIntervalLowerBound() == null) ? 0 : getPredictionIntervalLowerBound().hashCode());
hashCode = prime * hashCode + ((getPredictionIntervalUpperBound() == null) ? 0 : getPredictionIntervalUpperBound().hashCode());
return hashCode;
}
@Override
public ForecastResult clone() {
try {
return (ForecastResult) 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.costexplorer.model.transform.ForecastResultMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}