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

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

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

    /**
     * 

* The amount of time that your reservations covered. *

*/ private java.util.List coveragesByTime; /** *

* The total amount of instance usage that a reservation covered. *

*/ private Coverage total; /** *

* The token for the next set of retrievable results. Amazon Web Services provides the token when the response from * a previous call has more results than the maximum page size. *

*/ private String nextPageToken; /** *

* The amount of time that your reservations covered. *

* * @return The amount of time that your reservations covered. */ public java.util.List getCoveragesByTime() { return coveragesByTime; } /** *

* The amount of time that your reservations covered. *

* * @param coveragesByTime * The amount of time that your reservations covered. */ public void setCoveragesByTime(java.util.Collection coveragesByTime) { if (coveragesByTime == null) { this.coveragesByTime = null; return; } this.coveragesByTime = new java.util.ArrayList(coveragesByTime); } /** *

* The amount of time that your reservations covered. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setCoveragesByTime(java.util.Collection)} or {@link #withCoveragesByTime(java.util.Collection)} if you * want to override the existing values. *

* * @param coveragesByTime * The amount of time that your reservations covered. * @return Returns a reference to this object so that method calls can be chained together. */ public GetReservationCoverageResult withCoveragesByTime(CoverageByTime... coveragesByTime) { if (this.coveragesByTime == null) { setCoveragesByTime(new java.util.ArrayList(coveragesByTime.length)); } for (CoverageByTime ele : coveragesByTime) { this.coveragesByTime.add(ele); } return this; } /** *

* The amount of time that your reservations covered. *

* * @param coveragesByTime * The amount of time that your reservations covered. * @return Returns a reference to this object so that method calls can be chained together. */ public GetReservationCoverageResult withCoveragesByTime(java.util.Collection coveragesByTime) { setCoveragesByTime(coveragesByTime); return this; } /** *

* The total amount of instance usage that a reservation covered. *

* * @param total * The total amount of instance usage that a reservation covered. */ public void setTotal(Coverage total) { this.total = total; } /** *

* The total amount of instance usage that a reservation covered. *

* * @return The total amount of instance usage that a reservation covered. */ public Coverage getTotal() { return this.total; } /** *

* The total amount of instance usage that a reservation covered. *

* * @param total * The total amount of instance usage that a reservation covered. * @return Returns a reference to this object so that method calls can be chained together. */ public GetReservationCoverageResult withTotal(Coverage total) { setTotal(total); return this; } /** *

* The token for the next set of retrievable results. Amazon Web Services provides the token when the response from * a previous call has more results than the maximum page size. *

* * @param nextPageToken * The token for the next set of retrievable results. Amazon Web Services provides the token when the * response from a previous call has more results than the maximum page size. */ public void setNextPageToken(String nextPageToken) { this.nextPageToken = nextPageToken; } /** *

* The token for the next set of retrievable results. Amazon Web Services provides the token when the response from * a previous call has more results than the maximum page size. *

* * @return The token for the next set of retrievable results. Amazon Web Services provides the token when the * response from a previous call has more results than the maximum page size. */ public String getNextPageToken() { return this.nextPageToken; } /** *

* The token for the next set of retrievable results. Amazon Web Services provides the token when the response from * a previous call has more results than the maximum page size. *

* * @param nextPageToken * The token for the next set of retrievable results. Amazon Web Services provides the token when the * response from a previous call has more results than the maximum page size. * @return Returns a reference to this object so that method calls can be chained together. */ public GetReservationCoverageResult withNextPageToken(String nextPageToken) { setNextPageToken(nextPageToken); 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 (getCoveragesByTime() != null) sb.append("CoveragesByTime: ").append(getCoveragesByTime()).append(","); if (getTotal() != null) sb.append("Total: ").append(getTotal()).append(","); if (getNextPageToken() != null) sb.append("NextPageToken: ").append(getNextPageToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetReservationCoverageResult == false) return false; GetReservationCoverageResult other = (GetReservationCoverageResult) obj; if (other.getCoveragesByTime() == null ^ this.getCoveragesByTime() == null) return false; if (other.getCoveragesByTime() != null && other.getCoveragesByTime().equals(this.getCoveragesByTime()) == false) return false; if (other.getTotal() == null ^ this.getTotal() == null) return false; if (other.getTotal() != null && other.getTotal().equals(this.getTotal()) == false) return false; if (other.getNextPageToken() == null ^ this.getNextPageToken() == null) return false; if (other.getNextPageToken() != null && other.getNextPageToken().equals(this.getNextPageToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCoveragesByTime() == null) ? 0 : getCoveragesByTime().hashCode()); hashCode = prime * hashCode + ((getTotal() == null) ? 0 : getTotal().hashCode()); hashCode = prime * hashCode + ((getNextPageToken() == null) ? 0 : getNextPageToken().hashCode()); return hashCode; } @Override public GetReservationCoverageResult clone() { try { return (GetReservationCoverageResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy