com.amazonaws.services.forecastquery.model.QueryForecastRequest Maven / Gradle / Ivy
/*
* Copyright 2017-2022 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.forecastquery.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class QueryForecastRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the forecast to query.
*
*/
private String forecastArn;
/**
*
* The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For
* example, 2015-01-01T08:00:00.
*
*/
private String startDate;
/**
*
* The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For
* example, 2015-01-01T20:00:00.
*
*/
private String endDate;
/**
*
* The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for
* client_21
in the electricity usage dataset, specify the following:
*
*
* {"item_id" : "client_21"}
*
*
* To get the full forecast, use the CreateForecastExportJob operation.
*
*/
private java.util.Map filters;
/**
*
* If the result of the previous request was truncated, the response includes a NextToken
. To retrieve
* the next set of results, use the token in the next request. Tokens expire after 24 hours.
*
*/
private String nextToken;
/**
*
* The Amazon Resource Name (ARN) of the forecast to query.
*
*
* @param forecastArn
* The Amazon Resource Name (ARN) of the forecast to query.
*/
public void setForecastArn(String forecastArn) {
this.forecastArn = forecastArn;
}
/**
*
* The Amazon Resource Name (ARN) of the forecast to query.
*
*
* @return The Amazon Resource Name (ARN) of the forecast to query.
*/
public String getForecastArn() {
return this.forecastArn;
}
/**
*
* The Amazon Resource Name (ARN) of the forecast to query.
*
*
* @param forecastArn
* The Amazon Resource Name (ARN) of the forecast to query.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryForecastRequest withForecastArn(String forecastArn) {
setForecastArn(forecastArn);
return this;
}
/**
*
* The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For
* example, 2015-01-01T08:00:00.
*
*
* @param startDate
* The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601
* format). For example, 2015-01-01T08:00:00.
*/
public void setStartDate(String startDate) {
this.startDate = startDate;
}
/**
*
* The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For
* example, 2015-01-01T08:00:00.
*
*
* @return The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601
* format). For example, 2015-01-01T08:00:00.
*/
public String getStartDate() {
return this.startDate;
}
/**
*
* The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For
* example, 2015-01-01T08:00:00.
*
*
* @param startDate
* The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601
* format). For example, 2015-01-01T08:00:00.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryForecastRequest withStartDate(String startDate) {
setStartDate(startDate);
return this;
}
/**
*
* The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For
* example, 2015-01-01T20:00:00.
*
*
* @param endDate
* The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601
* format). For example, 2015-01-01T20:00:00.
*/
public void setEndDate(String endDate) {
this.endDate = endDate;
}
/**
*
* The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For
* example, 2015-01-01T20:00:00.
*
*
* @return The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601
* format). For example, 2015-01-01T20:00:00.
*/
public String getEndDate() {
return this.endDate;
}
/**
*
* The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For
* example, 2015-01-01T20:00:00.
*
*
* @param endDate
* The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601
* format). For example, 2015-01-01T20:00:00.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryForecastRequest withEndDate(String endDate) {
setEndDate(endDate);
return this;
}
/**
*
* The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for
* client_21
in the electricity usage dataset, specify the following:
*
*
* {"item_id" : "client_21"}
*
*
* To get the full forecast, use the CreateForecastExportJob operation.
*
*
* @return The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for
* client_21
in the electricity usage dataset, specify the following:
*
* {"item_id" : "client_21"}
*
*
* To get the full forecast, use the CreateForecastExportJob operation.
*/
public java.util.Map getFilters() {
return filters;
}
/**
*
* The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for
* client_21
in the electricity usage dataset, specify the following:
*
*
* {"item_id" : "client_21"}
*
*
* To get the full forecast, use the CreateForecastExportJob operation.
*
*
* @param filters
* The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for
* client_21
in the electricity usage dataset, specify the following:
*
* {"item_id" : "client_21"}
*
*
* To get the full forecast, use the CreateForecastExportJob operation.
*/
public void setFilters(java.util.Map filters) {
this.filters = filters;
}
/**
*
* The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for
* client_21
in the electricity usage dataset, specify the following:
*
*
* {"item_id" : "client_21"}
*
*
* To get the full forecast, use the CreateForecastExportJob operation.
*
*
* @param filters
* The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for
* client_21
in the electricity usage dataset, specify the following:
*
* {"item_id" : "client_21"}
*
*
* To get the full forecast, use the CreateForecastExportJob operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryForecastRequest withFilters(java.util.Map filters) {
setFilters(filters);
return this;
}
/**
* Add a single Filters entry
*
* @see QueryForecastRequest#withFilters
* @returns a reference to this object so that method calls can be chained together.
*/
public QueryForecastRequest addFiltersEntry(String key, String value) {
if (null == this.filters) {
this.filters = new java.util.HashMap();
}
if (this.filters.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.filters.put(key, value);
return this;
}
/**
* Removes all the entries added into Filters.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryForecastRequest clearFiltersEntries() {
this.filters = null;
return this;
}
/**
*
* If the result of the previous request was truncated, the response includes a NextToken
. To retrieve
* the next set of results, use the token in the next request. Tokens expire after 24 hours.
*
*
* @param nextToken
* If the result of the previous request was truncated, the response includes a NextToken
. To
* retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* If the result of the previous request was truncated, the response includes a NextToken
. To retrieve
* the next set of results, use the token in the next request. Tokens expire after 24 hours.
*
*
* @return If the result of the previous request was truncated, the response includes a NextToken
. To
* retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* If the result of the previous request was truncated, the response includes a NextToken
. To retrieve
* the next set of results, use the token in the next request. Tokens expire after 24 hours.
*
*
* @param nextToken
* If the result of the previous request was truncated, the response includes a NextToken
. To
* retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QueryForecastRequest withNextToken(String nextToken) {
setNextToken(nextToken);
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 (getForecastArn() != null)
sb.append("ForecastArn: ").append(getForecastArn()).append(",");
if (getStartDate() != null)
sb.append("StartDate: ").append(getStartDate()).append(",");
if (getEndDate() != null)
sb.append("EndDate: ").append(getEndDate()).append(",");
if (getFilters() != null)
sb.append("Filters: ").append(getFilters()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof QueryForecastRequest == false)
return false;
QueryForecastRequest other = (QueryForecastRequest) obj;
if (other.getForecastArn() == null ^ this.getForecastArn() == null)
return false;
if (other.getForecastArn() != null && other.getForecastArn().equals(this.getForecastArn()) == false)
return false;
if (other.getStartDate() == null ^ this.getStartDate() == null)
return false;
if (other.getStartDate() != null && other.getStartDate().equals(this.getStartDate()) == false)
return false;
if (other.getEndDate() == null ^ this.getEndDate() == null)
return false;
if (other.getEndDate() != null && other.getEndDate().equals(this.getEndDate()) == false)
return false;
if (other.getFilters() == null ^ this.getFilters() == null)
return false;
if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getForecastArn() == null) ? 0 : getForecastArn().hashCode());
hashCode = prime * hashCode + ((getStartDate() == null) ? 0 : getStartDate().hashCode());
hashCode = prime * hashCode + ((getEndDate() == null) ? 0 : getEndDate().hashCode());
hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public QueryForecastRequest clone() {
return (QueryForecastRequest) super.clone();
}
}