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

com.amazonaws.services.costexplorer.model.GetSavingsPlansUtilizationRequest 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

The newest version!
/*
 * 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.AmazonWebServiceRequest;

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

    /**
     * 

* The time period that you want the usage and costs for. The Start date must be within 13 months. The * End date must be after the Start date, and before the current date. Future dates can't * be used as an End date. *

*/ private DateInterval timePeriod; /** *

* The granularity of the Amazon Web Services utillization data for your Savings Plans. *

*

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

*/ private String granularity; /** *

* Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the * following dimensions: *

*
    *
  • *

    * LINKED_ACCOUNT *

    *
  • *
  • *

    * SAVINGS_PLAN_ARN *

    *
  • *
  • *

    * SAVINGS_PLANS_TYPE *

    *
  • *
  • *

    * REGION *

    *
  • *
  • *

    * PAYMENT_OPTION *

    *
  • *
  • *

    * INSTANCE_TYPE_FAMILY *

    *
  • *
*

* GetSavingsPlansUtilization uses the same Expression * object as the other operations, but only AND is supported among each dimension. *

*/ private Expression filter; /** *

* The value that you want to sort the data by. *

*

* The following values are supported for Key: *

*
    *
  • *

    * UtilizationPercentage *

    *
  • *
  • *

    * TotalCommitment *

    *
  • *
  • *

    * UsedCommitment *

    *
  • *
  • *

    * UnusedCommitment *

    *
  • *
  • *

    * NetSavings *

    *
  • *
*

* The supported values for SortOrder are ASCENDING and DESCENDING. *

*/ private SortDefinition sortBy; /** *

* The time period that you want the usage and costs for. The Start date must be within 13 months. The * End date must be after the Start date, and before the current date. Future dates can't * be used as an End date. *

* * @param timePeriod * The time period that you want the usage and costs for. The Start date must be within 13 * months. The End date must be after the Start date, and before the current date. * Future dates can't be used as an End date. */ public void setTimePeriod(DateInterval timePeriod) { this.timePeriod = timePeriod; } /** *

* The time period that you want the usage and costs for. The Start date must be within 13 months. The * End date must be after the Start date, and before the current date. Future dates can't * be used as an End date. *

* * @return The time period that you want the usage and costs for. The Start date must be within 13 * months. The End date must be after the Start date, and before the current date. * Future dates can't be used as an End date. */ public DateInterval getTimePeriod() { return this.timePeriod; } /** *

* The time period that you want the usage and costs for. The Start date must be within 13 months. The * End date must be after the Start date, and before the current date. Future dates can't * be used as an End date. *

* * @param timePeriod * The time period that you want the usage and costs for. The Start date must be within 13 * months. The End date must be after the Start date, and before the current date. * Future dates can't be used as an End date. * @return Returns a reference to this object so that method calls can be chained together. */ public GetSavingsPlansUtilizationRequest withTimePeriod(DateInterval timePeriod) { setTimePeriod(timePeriod); return this; } /** *

* The granularity of the Amazon Web Services utillization data for your Savings Plans. *

*

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

* * @param granularity * The granularity of the Amazon Web Services utillization data for your Savings Plans.

*

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

* The granularity of the Amazon Web Services utillization data for your Savings Plans. *

*

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

* * @return The granularity of the Amazon Web Services utillization data for your Savings Plans.

*

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

* The granularity of the Amazon Web Services utillization data for your Savings Plans. *

*

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

* * @param granularity * The granularity of the Amazon Web Services utillization data for your Savings Plans.

*

* The GetSavingsPlansUtilization 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 GetSavingsPlansUtilizationRequest withGranularity(String granularity) { setGranularity(granularity); return this; } /** *

* The granularity of the Amazon Web Services utillization data for your Savings Plans. *

*

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

* * @param granularity * The granularity of the Amazon Web Services utillization data for your Savings Plans.

*

* The GetSavingsPlansUtilization 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 GetSavingsPlansUtilizationRequest withGranularity(Granularity granularity) { this.granularity = granularity.toString(); return this; } /** *

* Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the * following dimensions: *

*
    *
  • *

    * LINKED_ACCOUNT *

    *
  • *
  • *

    * SAVINGS_PLAN_ARN *

    *
  • *
  • *

    * SAVINGS_PLANS_TYPE *

    *
  • *
  • *

    * REGION *

    *
  • *
  • *

    * PAYMENT_OPTION *

    *
  • *
  • *

    * INSTANCE_TYPE_FAMILY *

    *
  • *
*

* GetSavingsPlansUtilization uses the same Expression * object as the other operations, but only AND is supported among each dimension. *

* * @param filter * Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data * with the following dimensions:

*
    *
  • *

    * LINKED_ACCOUNT *

    *
  • *
  • *

    * SAVINGS_PLAN_ARN *

    *
  • *
  • *

    * SAVINGS_PLANS_TYPE *

    *
  • *
  • *

    * REGION *

    *
  • *
  • *

    * PAYMENT_OPTION *

    *
  • *
  • *

    * INSTANCE_TYPE_FAMILY *

    *
  • *
*

* GetSavingsPlansUtilization uses the same Expression object as the other operations, but only AND is supported among each * dimension. */ public void setFilter(Expression filter) { this.filter = filter; } /** *

* Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the * following dimensions: *

*
    *
  • *

    * LINKED_ACCOUNT *

    *
  • *
  • *

    * SAVINGS_PLAN_ARN *

    *
  • *
  • *

    * SAVINGS_PLANS_TYPE *

    *
  • *
  • *

    * REGION *

    *
  • *
  • *

    * PAYMENT_OPTION *

    *
  • *
  • *

    * INSTANCE_TYPE_FAMILY *

    *
  • *
*

* GetSavingsPlansUtilization uses the same Expression * object as the other operations, but only AND is supported among each dimension. *

* * @return Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data * with the following dimensions:

*
    *
  • *

    * LINKED_ACCOUNT *

    *
  • *
  • *

    * SAVINGS_PLAN_ARN *

    *
  • *
  • *

    * SAVINGS_PLANS_TYPE *

    *
  • *
  • *

    * REGION *

    *
  • *
  • *

    * PAYMENT_OPTION *

    *
  • *
  • *

    * INSTANCE_TYPE_FAMILY *

    *
  • *
*

* GetSavingsPlansUtilization uses the same Expression object as the other operations, but only AND is supported among each * dimension. */ public Expression getFilter() { return this.filter; } /** *

* Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the * following dimensions: *

*
    *
  • *

    * LINKED_ACCOUNT *

    *
  • *
  • *

    * SAVINGS_PLAN_ARN *

    *
  • *
  • *

    * SAVINGS_PLANS_TYPE *

    *
  • *
  • *

    * REGION *

    *
  • *
  • *

    * PAYMENT_OPTION *

    *
  • *
  • *

    * INSTANCE_TYPE_FAMILY *

    *
  • *
*

* GetSavingsPlansUtilization uses the same Expression * object as the other operations, but only AND is supported among each dimension. *

* * @param filter * Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data * with the following dimensions:

*
    *
  • *

    * LINKED_ACCOUNT *

    *
  • *
  • *

    * SAVINGS_PLAN_ARN *

    *
  • *
  • *

    * SAVINGS_PLANS_TYPE *

    *
  • *
  • *

    * REGION *

    *
  • *
  • *

    * PAYMENT_OPTION *

    *
  • *
  • *

    * INSTANCE_TYPE_FAMILY *

    *
  • *
*

* GetSavingsPlansUtilization uses the same Expression object as the other operations, but only AND is supported among each * dimension. * @return Returns a reference to this object so that method calls can be chained together. */ public GetSavingsPlansUtilizationRequest withFilter(Expression filter) { setFilter(filter); return this; } /** *

* The value that you want to sort the data by. *

*

* The following values are supported for Key: *

*
    *
  • *

    * UtilizationPercentage *

    *
  • *
  • *

    * TotalCommitment *

    *
  • *
  • *

    * UsedCommitment *

    *
  • *
  • *

    * UnusedCommitment *

    *
  • *
  • *

    * NetSavings *

    *
  • *
*

* The supported values for SortOrder are ASCENDING and DESCENDING. *

* * @param sortBy * The value that you want to sort the data by.

*

* The following values are supported for Key: *

*
    *
  • *

    * UtilizationPercentage *

    *
  • *
  • *

    * TotalCommitment *

    *
  • *
  • *

    * UsedCommitment *

    *
  • *
  • *

    * UnusedCommitment *

    *
  • *
  • *

    * NetSavings *

    *
  • *
*

* The supported values for SortOrder are ASCENDING and DESCENDING. */ public void setSortBy(SortDefinition sortBy) { this.sortBy = sortBy; } /** *

* The value that you want to sort the data by. *

*

* The following values are supported for Key: *

*
    *
  • *

    * UtilizationPercentage *

    *
  • *
  • *

    * TotalCommitment *

    *
  • *
  • *

    * UsedCommitment *

    *
  • *
  • *

    * UnusedCommitment *

    *
  • *
  • *

    * NetSavings *

    *
  • *
*

* The supported values for SortOrder are ASCENDING and DESCENDING. *

* * @return The value that you want to sort the data by.

*

* The following values are supported for Key: *

*
    *
  • *

    * UtilizationPercentage *

    *
  • *
  • *

    * TotalCommitment *

    *
  • *
  • *

    * UsedCommitment *

    *
  • *
  • *

    * UnusedCommitment *

    *
  • *
  • *

    * NetSavings *

    *
  • *
*

* The supported values for SortOrder are ASCENDING and DESCENDING. */ public SortDefinition getSortBy() { return this.sortBy; } /** *

* The value that you want to sort the data by. *

*

* The following values are supported for Key: *

*
    *
  • *

    * UtilizationPercentage *

    *
  • *
  • *

    * TotalCommitment *

    *
  • *
  • *

    * UsedCommitment *

    *
  • *
  • *

    * UnusedCommitment *

    *
  • *
  • *

    * NetSavings *

    *
  • *
*

* The supported values for SortOrder are ASCENDING and DESCENDING. *

* * @param sortBy * The value that you want to sort the data by.

*

* The following values are supported for Key: *

*
    *
  • *

    * UtilizationPercentage *

    *
  • *
  • *

    * TotalCommitment *

    *
  • *
  • *

    * UsedCommitment *

    *
  • *
  • *

    * UnusedCommitment *

    *
  • *
  • *

    * NetSavings *

    *
  • *
*

* The supported values for SortOrder are ASCENDING and DESCENDING. * @return Returns a reference to this object so that method calls can be chained together. */ public GetSavingsPlansUtilizationRequest withSortBy(SortDefinition sortBy) { setSortBy(sortBy); 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 (getGranularity() != null) sb.append("Granularity: ").append(getGranularity()).append(","); if (getFilter() != null) sb.append("Filter: ").append(getFilter()).append(","); if (getSortBy() != null) sb.append("SortBy: ").append(getSortBy()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetSavingsPlansUtilizationRequest == false) return false; GetSavingsPlansUtilizationRequest other = (GetSavingsPlansUtilizationRequest) obj; if (other.getTimePeriod() == null ^ this.getTimePeriod() == null) return false; if (other.getTimePeriod() != null && other.getTimePeriod().equals(this.getTimePeriod()) == 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.getSortBy() == null ^ this.getSortBy() == null) return false; if (other.getSortBy() != null && other.getSortBy().equals(this.getSortBy()) == 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 + ((getGranularity() == null) ? 0 : getGranularity().hashCode()); hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode()); hashCode = prime * hashCode + ((getSortBy() == null) ? 0 : getSortBy().hashCode()); return hashCode; } @Override public GetSavingsPlansUtilizationRequest clone() { return (GetSavingsPlansUtilizationRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy