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

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

/**
 * 

* Utilization metrics for the instance. *

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

* The maximum observed or expected CPU utilization of the instance. *

*/ private String maxCpuUtilizationPercentage; /** *

* The maximum observed or expected memory utilization of the instance. *

*/ private String maxMemoryUtilizationPercentage; /** *

* The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage. *

*/ private String maxStorageUtilizationPercentage; /** *

* The EBS field that contains a list of EBS metrics that are associated with the current instance. *

*/ private EBSResourceUtilization eBSResourceUtilization; /** *

* The field that contains a list of disk (local storage) metrics that are associated with the current instance. *

*/ private DiskResourceUtilization diskResourceUtilization; /** *

* The network field that contains a list of network metrics that are associated with the current instance. *

*/ private NetworkResourceUtilization networkResourceUtilization; /** *

* The maximum observed or expected CPU utilization of the instance. *

* * @param maxCpuUtilizationPercentage * The maximum observed or expected CPU utilization of the instance. */ public void setMaxCpuUtilizationPercentage(String maxCpuUtilizationPercentage) { this.maxCpuUtilizationPercentage = maxCpuUtilizationPercentage; } /** *

* The maximum observed or expected CPU utilization of the instance. *

* * @return The maximum observed or expected CPU utilization of the instance. */ public String getMaxCpuUtilizationPercentage() { return this.maxCpuUtilizationPercentage; } /** *

* The maximum observed or expected CPU utilization of the instance. *

* * @param maxCpuUtilizationPercentage * The maximum observed or expected CPU utilization of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceUtilization withMaxCpuUtilizationPercentage(String maxCpuUtilizationPercentage) { setMaxCpuUtilizationPercentage(maxCpuUtilizationPercentage); return this; } /** *

* The maximum observed or expected memory utilization of the instance. *

* * @param maxMemoryUtilizationPercentage * The maximum observed or expected memory utilization of the instance. */ public void setMaxMemoryUtilizationPercentage(String maxMemoryUtilizationPercentage) { this.maxMemoryUtilizationPercentage = maxMemoryUtilizationPercentage; } /** *

* The maximum observed or expected memory utilization of the instance. *

* * @return The maximum observed or expected memory utilization of the instance. */ public String getMaxMemoryUtilizationPercentage() { return this.maxMemoryUtilizationPercentage; } /** *

* The maximum observed or expected memory utilization of the instance. *

* * @param maxMemoryUtilizationPercentage * The maximum observed or expected memory utilization of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceUtilization withMaxMemoryUtilizationPercentage(String maxMemoryUtilizationPercentage) { setMaxMemoryUtilizationPercentage(maxMemoryUtilizationPercentage); return this; } /** *

* The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage. *

* * @param maxStorageUtilizationPercentage * The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage. */ public void setMaxStorageUtilizationPercentage(String maxStorageUtilizationPercentage) { this.maxStorageUtilizationPercentage = maxStorageUtilizationPercentage; } /** *

* The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage. *

* * @return The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage. */ public String getMaxStorageUtilizationPercentage() { return this.maxStorageUtilizationPercentage; } /** *

* The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage. *

* * @param maxStorageUtilizationPercentage * The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceUtilization withMaxStorageUtilizationPercentage(String maxStorageUtilizationPercentage) { setMaxStorageUtilizationPercentage(maxStorageUtilizationPercentage); return this; } /** *

* The EBS field that contains a list of EBS metrics that are associated with the current instance. *

* * @param eBSResourceUtilization * The EBS field that contains a list of EBS metrics that are associated with the current instance. */ public void setEBSResourceUtilization(EBSResourceUtilization eBSResourceUtilization) { this.eBSResourceUtilization = eBSResourceUtilization; } /** *

* The EBS field that contains a list of EBS metrics that are associated with the current instance. *

* * @return The EBS field that contains a list of EBS metrics that are associated with the current instance. */ public EBSResourceUtilization getEBSResourceUtilization() { return this.eBSResourceUtilization; } /** *

* The EBS field that contains a list of EBS metrics that are associated with the current instance. *

* * @param eBSResourceUtilization * The EBS field that contains a list of EBS metrics that are associated with the current instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceUtilization withEBSResourceUtilization(EBSResourceUtilization eBSResourceUtilization) { setEBSResourceUtilization(eBSResourceUtilization); return this; } /** *

* The field that contains a list of disk (local storage) metrics that are associated with the current instance. *

* * @param diskResourceUtilization * The field that contains a list of disk (local storage) metrics that are associated with the current * instance. */ public void setDiskResourceUtilization(DiskResourceUtilization diskResourceUtilization) { this.diskResourceUtilization = diskResourceUtilization; } /** *

* The field that contains a list of disk (local storage) metrics that are associated with the current instance. *

* * @return The field that contains a list of disk (local storage) metrics that are associated with the current * instance. */ public DiskResourceUtilization getDiskResourceUtilization() { return this.diskResourceUtilization; } /** *

* The field that contains a list of disk (local storage) metrics that are associated with the current instance. *

* * @param diskResourceUtilization * The field that contains a list of disk (local storage) metrics that are associated with the current * instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceUtilization withDiskResourceUtilization(DiskResourceUtilization diskResourceUtilization) { setDiskResourceUtilization(diskResourceUtilization); return this; } /** *

* The network field that contains a list of network metrics that are associated with the current instance. *

* * @param networkResourceUtilization * The network field that contains a list of network metrics that are associated with the current instance. */ public void setNetworkResourceUtilization(NetworkResourceUtilization networkResourceUtilization) { this.networkResourceUtilization = networkResourceUtilization; } /** *

* The network field that contains a list of network metrics that are associated with the current instance. *

* * @return The network field that contains a list of network metrics that are associated with the current instance. */ public NetworkResourceUtilization getNetworkResourceUtilization() { return this.networkResourceUtilization; } /** *

* The network field that contains a list of network metrics that are associated with the current instance. *

* * @param networkResourceUtilization * The network field that contains a list of network metrics that are associated with the current instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceUtilization withNetworkResourceUtilization(NetworkResourceUtilization networkResourceUtilization) { setNetworkResourceUtilization(networkResourceUtilization); 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 (getMaxCpuUtilizationPercentage() != null) sb.append("MaxCpuUtilizationPercentage: ").append(getMaxCpuUtilizationPercentage()).append(","); if (getMaxMemoryUtilizationPercentage() != null) sb.append("MaxMemoryUtilizationPercentage: ").append(getMaxMemoryUtilizationPercentage()).append(","); if (getMaxStorageUtilizationPercentage() != null) sb.append("MaxStorageUtilizationPercentage: ").append(getMaxStorageUtilizationPercentage()).append(","); if (getEBSResourceUtilization() != null) sb.append("EBSResourceUtilization: ").append(getEBSResourceUtilization()).append(","); if (getDiskResourceUtilization() != null) sb.append("DiskResourceUtilization: ").append(getDiskResourceUtilization()).append(","); if (getNetworkResourceUtilization() != null) sb.append("NetworkResourceUtilization: ").append(getNetworkResourceUtilization()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EC2ResourceUtilization == false) return false; EC2ResourceUtilization other = (EC2ResourceUtilization) obj; if (other.getMaxCpuUtilizationPercentage() == null ^ this.getMaxCpuUtilizationPercentage() == null) return false; if (other.getMaxCpuUtilizationPercentage() != null && other.getMaxCpuUtilizationPercentage().equals(this.getMaxCpuUtilizationPercentage()) == false) return false; if (other.getMaxMemoryUtilizationPercentage() == null ^ this.getMaxMemoryUtilizationPercentage() == null) return false; if (other.getMaxMemoryUtilizationPercentage() != null && other.getMaxMemoryUtilizationPercentage().equals(this.getMaxMemoryUtilizationPercentage()) == false) return false; if (other.getMaxStorageUtilizationPercentage() == null ^ this.getMaxStorageUtilizationPercentage() == null) return false; if (other.getMaxStorageUtilizationPercentage() != null && other.getMaxStorageUtilizationPercentage().equals(this.getMaxStorageUtilizationPercentage()) == false) return false; if (other.getEBSResourceUtilization() == null ^ this.getEBSResourceUtilization() == null) return false; if (other.getEBSResourceUtilization() != null && other.getEBSResourceUtilization().equals(this.getEBSResourceUtilization()) == false) return false; if (other.getDiskResourceUtilization() == null ^ this.getDiskResourceUtilization() == null) return false; if (other.getDiskResourceUtilization() != null && other.getDiskResourceUtilization().equals(this.getDiskResourceUtilization()) == false) return false; if (other.getNetworkResourceUtilization() == null ^ this.getNetworkResourceUtilization() == null) return false; if (other.getNetworkResourceUtilization() != null && other.getNetworkResourceUtilization().equals(this.getNetworkResourceUtilization()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMaxCpuUtilizationPercentage() == null) ? 0 : getMaxCpuUtilizationPercentage().hashCode()); hashCode = prime * hashCode + ((getMaxMemoryUtilizationPercentage() == null) ? 0 : getMaxMemoryUtilizationPercentage().hashCode()); hashCode = prime * hashCode + ((getMaxStorageUtilizationPercentage() == null) ? 0 : getMaxStorageUtilizationPercentage().hashCode()); hashCode = prime * hashCode + ((getEBSResourceUtilization() == null) ? 0 : getEBSResourceUtilization().hashCode()); hashCode = prime * hashCode + ((getDiskResourceUtilization() == null) ? 0 : getDiskResourceUtilization().hashCode()); hashCode = prime * hashCode + ((getNetworkResourceUtilization() == null) ? 0 : getNetworkResourceUtilization().hashCode()); return hashCode; } @Override public EC2ResourceUtilization clone() { try { return (EC2ResourceUtilization) 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.EC2ResourceUtilizationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy