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

com.amazonaws.services.costexplorer.model.CoverageHours 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* How long a running instance either used a reservation or was On-Demand. *

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

* The number of instance running hours that On-Demand Instances covered. *

*/ private String onDemandHours; /** *

* The number of instance running hours that reservations covered. *

*/ private String reservedHours; /** *

* The total instance usage, in hours. *

*/ private String totalRunningHours; /** *

* The percentage of instance hours that a reservation covered. *

*/ private String coverageHoursPercentage; /** *

* The number of instance running hours that On-Demand Instances covered. *

* * @param onDemandHours * The number of instance running hours that On-Demand Instances covered. */ public void setOnDemandHours(String onDemandHours) { this.onDemandHours = onDemandHours; } /** *

* The number of instance running hours that On-Demand Instances covered. *

* * @return The number of instance running hours that On-Demand Instances covered. */ public String getOnDemandHours() { return this.onDemandHours; } /** *

* The number of instance running hours that On-Demand Instances covered. *

* * @param onDemandHours * The number of instance running hours that On-Demand Instances covered. * @return Returns a reference to this object so that method calls can be chained together. */ public CoverageHours withOnDemandHours(String onDemandHours) { setOnDemandHours(onDemandHours); return this; } /** *

* The number of instance running hours that reservations covered. *

* * @param reservedHours * The number of instance running hours that reservations covered. */ public void setReservedHours(String reservedHours) { this.reservedHours = reservedHours; } /** *

* The number of instance running hours that reservations covered. *

* * @return The number of instance running hours that reservations covered. */ public String getReservedHours() { return this.reservedHours; } /** *

* The number of instance running hours that reservations covered. *

* * @param reservedHours * The number of instance running hours that reservations covered. * @return Returns a reference to this object so that method calls can be chained together. */ public CoverageHours withReservedHours(String reservedHours) { setReservedHours(reservedHours); return this; } /** *

* The total instance usage, in hours. *

* * @param totalRunningHours * The total instance usage, in hours. */ public void setTotalRunningHours(String totalRunningHours) { this.totalRunningHours = totalRunningHours; } /** *

* The total instance usage, in hours. *

* * @return The total instance usage, in hours. */ public String getTotalRunningHours() { return this.totalRunningHours; } /** *

* The total instance usage, in hours. *

* * @param totalRunningHours * The total instance usage, in hours. * @return Returns a reference to this object so that method calls can be chained together. */ public CoverageHours withTotalRunningHours(String totalRunningHours) { setTotalRunningHours(totalRunningHours); return this; } /** *

* The percentage of instance hours that a reservation covered. *

* * @param coverageHoursPercentage * The percentage of instance hours that a reservation covered. */ public void setCoverageHoursPercentage(String coverageHoursPercentage) { this.coverageHoursPercentage = coverageHoursPercentage; } /** *

* The percentage of instance hours that a reservation covered. *

* * @return The percentage of instance hours that a reservation covered. */ public String getCoverageHoursPercentage() { return this.coverageHoursPercentage; } /** *

* The percentage of instance hours that a reservation covered. *

* * @param coverageHoursPercentage * The percentage of instance hours that a reservation covered. * @return Returns a reference to this object so that method calls can be chained together. */ public CoverageHours withCoverageHoursPercentage(String coverageHoursPercentage) { setCoverageHoursPercentage(coverageHoursPercentage); 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 (getOnDemandHours() != null) sb.append("OnDemandHours: ").append(getOnDemandHours()).append(","); if (getReservedHours() != null) sb.append("ReservedHours: ").append(getReservedHours()).append(","); if (getTotalRunningHours() != null) sb.append("TotalRunningHours: ").append(getTotalRunningHours()).append(","); if (getCoverageHoursPercentage() != null) sb.append("CoverageHoursPercentage: ").append(getCoverageHoursPercentage()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CoverageHours == false) return false; CoverageHours other = (CoverageHours) obj; if (other.getOnDemandHours() == null ^ this.getOnDemandHours() == null) return false; if (other.getOnDemandHours() != null && other.getOnDemandHours().equals(this.getOnDemandHours()) == false) return false; if (other.getReservedHours() == null ^ this.getReservedHours() == null) return false; if (other.getReservedHours() != null && other.getReservedHours().equals(this.getReservedHours()) == false) return false; if (other.getTotalRunningHours() == null ^ this.getTotalRunningHours() == null) return false; if (other.getTotalRunningHours() != null && other.getTotalRunningHours().equals(this.getTotalRunningHours()) == false) return false; if (other.getCoverageHoursPercentage() == null ^ this.getCoverageHoursPercentage() == null) return false; if (other.getCoverageHoursPercentage() != null && other.getCoverageHoursPercentage().equals(this.getCoverageHoursPercentage()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOnDemandHours() == null) ? 0 : getOnDemandHours().hashCode()); hashCode = prime * hashCode + ((getReservedHours() == null) ? 0 : getReservedHours().hashCode()); hashCode = prime * hashCode + ((getTotalRunningHours() == null) ? 0 : getTotalRunningHours().hashCode()); hashCode = prime * hashCode + ((getCoverageHoursPercentage() == null) ? 0 : getCoverageHoursPercentage().hashCode()); return hashCode; } @Override public CoverageHours clone() { try { return (CoverageHours) 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.CoverageHoursMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy