All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.costexplorer.model.GetUsageForecastRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Cost Explorer module holds the client classes that are used for communicating with AWS Cost Explorer Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2015-2020 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.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetUsageForecastRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The start and end dates of the period that you want to retrieve usage forecast for. The start date is inclusive, * but the end date is exclusive. For example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and * including 2017-04-30 but not including 2017-05-01. *

*/ private DateInterval timePeriod; /** *

* Which metric Cost Explorer uses to create your forecast. *

*

* Valid values for a GetUsageForecast call are the following: *

*
    *
  • *

    * USAGE_QUANTITY *

    *
  • *
  • *

    * NORMALIZED_USAGE_AMOUNT *

    *
  • *
*/ private String metric; /** *

* How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 months of * MONTHLY forecasts. *

*

* The GetUsageForecast operation supports only DAILY and MONTHLY * granularities. *

*/ private String granularity; /** *

* The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer * filters. *

*/ private Expression filter; /** *

* Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around * the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is * about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction * intervals. *

*/ private Integer predictionIntervalLevel; /** *

* The start and end dates of the period that you want to retrieve usage forecast for. The start date is inclusive, * but the end date is exclusive. For example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and * including 2017-04-30 but not including 2017-05-01. *

* * @param timePeriod * The start and end dates of the period that you want to retrieve usage forecast for. The start date is * inclusive, but the end date is exclusive. For example, if start is 2017-01-01 * and end is 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not including * 2017-05-01. */ public void setTimePeriod(DateInterval timePeriod) { this.timePeriod = timePeriod; } /** *

* The start and end dates of the period that you want to retrieve usage forecast for. The start date is inclusive, * but the end date is exclusive. For example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and * including 2017-04-30 but not including 2017-05-01. *

* * @return The start and end dates of the period that you want to retrieve usage forecast for. The start date is * inclusive, but the end date is exclusive. For example, if start is 2017-01-01 * and end is 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not including * 2017-05-01. */ public DateInterval getTimePeriod() { return this.timePeriod; } /** *

* The start and end dates of the period that you want to retrieve usage forecast for. The start date is inclusive, * but the end date is exclusive. For example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and * including 2017-04-30 but not including 2017-05-01. *

* * @param timePeriod * The start and end dates of the period that you want to retrieve usage forecast for. The start date is * inclusive, but the end date is exclusive. For example, if start is 2017-01-01 * and end is 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not including * 2017-05-01. * @return Returns a reference to this object so that method calls can be chained together. */ public GetUsageForecastRequest withTimePeriod(DateInterval timePeriod) { setTimePeriod(timePeriod); return this; } /** *

* Which metric Cost Explorer uses to create your forecast. *

*

* Valid values for a GetUsageForecast call are the following: *

*
    *
  • *

    * USAGE_QUANTITY *

    *
  • *
  • *

    * NORMALIZED_USAGE_AMOUNT *

    *
  • *
* * @param metric * Which metric Cost Explorer uses to create your forecast.

*

* Valid values for a GetUsageForecast call are the following: *

*
    *
  • *

    * USAGE_QUANTITY *

    *
  • *
  • *

    * NORMALIZED_USAGE_AMOUNT *

    *
  • * @see Metric */ public void setMetric(String metric) { this.metric = metric; } /** *

    * Which metric Cost Explorer uses to create your forecast. *

    *

    * Valid values for a GetUsageForecast call are the following: *

    *
      *
    • *

      * USAGE_QUANTITY *

      *
    • *
    • *

      * NORMALIZED_USAGE_AMOUNT *

      *
    • *
    * * @return Which metric Cost Explorer uses to create your forecast.

    *

    * Valid values for a GetUsageForecast call are the following: *

    *
      *
    • *

      * USAGE_QUANTITY *

      *
    • *
    • *

      * NORMALIZED_USAGE_AMOUNT *

      *
    • * @see Metric */ public String getMetric() { return this.metric; } /** *

      * Which metric Cost Explorer uses to create your forecast. *

      *

      * Valid values for a GetUsageForecast call are the following: *

      *
        *
      • *

        * USAGE_QUANTITY *

        *
      • *
      • *

        * NORMALIZED_USAGE_AMOUNT *

        *
      • *
      * * @param metric * Which metric Cost Explorer uses to create your forecast.

      *

      * Valid values for a GetUsageForecast call are the following: *

      *
        *
      • *

        * USAGE_QUANTITY *

        *
      • *
      • *

        * NORMALIZED_USAGE_AMOUNT *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see Metric */ public GetUsageForecastRequest withMetric(String metric) { setMetric(metric); return this; } /** *

        * Which metric Cost Explorer uses to create your forecast. *

        *

        * Valid values for a GetUsageForecast call are the following: *

        *
          *
        • *

          * USAGE_QUANTITY *

          *
        • *
        • *

          * NORMALIZED_USAGE_AMOUNT *

          *
        • *
        * * @param metric * Which metric Cost Explorer uses to create your forecast.

        *

        * Valid values for a GetUsageForecast call are the following: *

        *
          *
        • *

          * USAGE_QUANTITY *

          *
        • *
        • *

          * NORMALIZED_USAGE_AMOUNT *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see Metric */ public GetUsageForecastRequest withMetric(Metric metric) { this.metric = metric.toString(); return this; } /** *

          * How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 months of * MONTHLY forecasts. *

          *

          * The GetUsageForecast operation supports only DAILY and MONTHLY * granularities. *

          * * @param granularity * How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 * months of MONTHLY forecasts.

          *

          * The GetUsageForecast operation supports only DAILY and MONTHLY * granularities. * @see Granularity */ public void setGranularity(String granularity) { this.granularity = granularity; } /** *

          * How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 months of * MONTHLY forecasts. *

          *

          * The GetUsageForecast operation supports only DAILY and MONTHLY * granularities. *

          * * @return How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 * months of MONTHLY forecasts.

          *

          * The GetUsageForecast operation supports only DAILY and MONTHLY * granularities. * @see Granularity */ public String getGranularity() { return this.granularity; } /** *

          * How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 months of * MONTHLY forecasts. *

          *

          * The GetUsageForecast operation supports only DAILY and MONTHLY * granularities. *

          * * @param granularity * How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 * months of MONTHLY forecasts.

          *

          * The GetUsageForecast operation supports only DAILY and MONTHLY * granularities. * @return Returns a reference to this object so that method calls can be chained together. * @see Granularity */ public GetUsageForecastRequest withGranularity(String granularity) { setGranularity(granularity); return this; } /** *

          * How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 months of * MONTHLY forecasts. *

          *

          * The GetUsageForecast operation supports only DAILY and MONTHLY * granularities. *

          * * @param granularity * How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 * months of MONTHLY forecasts.

          *

          * The GetUsageForecast operation supports only DAILY and MONTHLY * granularities. * @return Returns a reference to this object so that method calls can be chained together. * @see Granularity */ public GetUsageForecastRequest withGranularity(Granularity granularity) { this.granularity = granularity.toString(); return this; } /** *

          * The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer * filters. *

          * * @param filter * The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost * Explorer filters. */ public void setFilter(Expression filter) { this.filter = filter; } /** *

          * The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer * filters. *

          * * @return The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost * Explorer filters. */ public Expression getFilter() { return this.filter; } /** *

          * The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer * filters. *

          * * @param filter * The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost * Explorer filters. * @return Returns a reference to this object so that method calls can be chained together. */ public GetUsageForecastRequest withFilter(Expression filter) { setFilter(filter); return this; } /** *

          * Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around * the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is * about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction * intervals. *

          * * @param predictionIntervalLevel * Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval * around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost * Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in * wider prediction intervals. */ public void setPredictionIntervalLevel(Integer predictionIntervalLevel) { this.predictionIntervalLevel = predictionIntervalLevel; } /** *

          * Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around * the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is * about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction * intervals. *

          * * @return Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval * around the mean by specifying a confidence level. The higher the confidence level, the more confident * Cost Explorer is about the actual value falling in the prediction interval. Higher confidence levels * result in wider prediction intervals. */ public Integer getPredictionIntervalLevel() { return this.predictionIntervalLevel; } /** *

          * Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around * the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is * about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction * intervals. *

          * * @param predictionIntervalLevel * Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval * around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost * Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in * wider prediction intervals. * @return Returns a reference to this object so that method calls can be chained together. */ public GetUsageForecastRequest withPredictionIntervalLevel(Integer predictionIntervalLevel) { setPredictionIntervalLevel(predictionIntervalLevel); 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 (getMetric() != null) sb.append("Metric: ").append(getMetric()).append(","); if (getGranularity() != null) sb.append("Granularity: ").append(getGranularity()).append(","); if (getFilter() != null) sb.append("Filter: ").append(getFilter()).append(","); if (getPredictionIntervalLevel() != null) sb.append("PredictionIntervalLevel: ").append(getPredictionIntervalLevel()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetUsageForecastRequest == false) return false; GetUsageForecastRequest other = (GetUsageForecastRequest) obj; if (other.getTimePeriod() == null ^ this.getTimePeriod() == null) return false; if (other.getTimePeriod() != null && other.getTimePeriod().equals(this.getTimePeriod()) == false) return false; if (other.getMetric() == null ^ this.getMetric() == null) return false; if (other.getMetric() != null && other.getMetric().equals(this.getMetric()) == false) return false; if (other.getGranularity() == null ^ this.getGranularity() == null) return false; if (other.getGranularity() != null && other.getGranularity().equals(this.getGranularity()) == false) return false; if (other.getFilter() == null ^ this.getFilter() == null) return false; if (other.getFilter() != null && other.getFilter().equals(this.getFilter()) == false) return false; if (other.getPredictionIntervalLevel() == null ^ this.getPredictionIntervalLevel() == null) return false; if (other.getPredictionIntervalLevel() != null && other.getPredictionIntervalLevel().equals(this.getPredictionIntervalLevel()) == 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 + ((getMetric() == null) ? 0 : getMetric().hashCode()); hashCode = prime * hashCode + ((getGranularity() == null) ? 0 : getGranularity().hashCode()); hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode()); hashCode = prime * hashCode + ((getPredictionIntervalLevel() == null) ? 0 : getPredictionIntervalLevel().hashCode()); return hashCode; } @Override public GetUsageForecastRequest clone() { return (GetUsageForecastRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy