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

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

/**
 * 

* Details on the Amazon EC2 Resource. *

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

* The hourly public On-Demand rate for the instance type. *

*/ private String hourlyOnDemandRate; /** *

* The type of Amazon Web Services instance. *

*/ private String instanceType; /** *

* The platform of the Amazon Web Services instance. The platform is the specific combination of operating system, * license model, and software on an instance. *

*/ private String platform; /** *

* The Amazon Web Services Region of the instance. *

*/ private String region; /** *

* The SKU of the product. *

*/ private String sku; /** *

* The memory capacity of the Amazon Web Services instance. *

*/ private String memory; /** *

* The network performance capacity of the Amazon Web Services instance. *

*/ private String networkPerformance; /** *

* The disk storage of the Amazon Web Services instance. This doesn't include EBS storage. *

*/ private String storage; /** *

* The number of VCPU cores in the Amazon Web Services instance type. *

*/ private String vcpu; /** *

* The hourly public On-Demand rate for the instance type. *

* * @param hourlyOnDemandRate * The hourly public On-Demand rate for the instance type. */ public void setHourlyOnDemandRate(String hourlyOnDemandRate) { this.hourlyOnDemandRate = hourlyOnDemandRate; } /** *

* The hourly public On-Demand rate for the instance type. *

* * @return The hourly public On-Demand rate for the instance type. */ public String getHourlyOnDemandRate() { return this.hourlyOnDemandRate; } /** *

* The hourly public On-Demand rate for the instance type. *

* * @param hourlyOnDemandRate * The hourly public On-Demand rate for the instance type. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceDetails withHourlyOnDemandRate(String hourlyOnDemandRate) { setHourlyOnDemandRate(hourlyOnDemandRate); return this; } /** *

* The type of Amazon Web Services instance. *

* * @param instanceType * The type of Amazon Web Services instance. */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The type of Amazon Web Services instance. *

* * @return The type of Amazon Web Services instance. */ public String getInstanceType() { return this.instanceType; } /** *

* The type of Amazon Web Services instance. *

* * @param instanceType * The type of Amazon Web Services instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceDetails withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

* The platform of the Amazon Web Services instance. The platform is the specific combination of operating system, * license model, and software on an instance. *

* * @param platform * The platform of the Amazon Web Services instance. The platform is the specific combination of operating * system, license model, and software on an instance. */ public void setPlatform(String platform) { this.platform = platform; } /** *

* The platform of the Amazon Web Services instance. The platform is the specific combination of operating system, * license model, and software on an instance. *

* * @return The platform of the Amazon Web Services instance. The platform is the specific combination of operating * system, license model, and software on an instance. */ public String getPlatform() { return this.platform; } /** *

* The platform of the Amazon Web Services instance. The platform is the specific combination of operating system, * license model, and software on an instance. *

* * @param platform * The platform of the Amazon Web Services instance. The platform is the specific combination of operating * system, license model, and software on an instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceDetails withPlatform(String platform) { setPlatform(platform); return this; } /** *

* The Amazon Web Services Region of the instance. *

* * @param region * The Amazon Web Services Region of the instance. */ public void setRegion(String region) { this.region = region; } /** *

* The Amazon Web Services Region of the instance. *

* * @return The Amazon Web Services Region of the instance. */ public String getRegion() { return this.region; } /** *

* The Amazon Web Services Region of the instance. *

* * @param region * The Amazon Web Services Region of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceDetails withRegion(String region) { setRegion(region); return this; } /** *

* The SKU of the product. *

* * @param sku * The SKU of the product. */ public void setSku(String sku) { this.sku = sku; } /** *

* The SKU of the product. *

* * @return The SKU of the product. */ public String getSku() { return this.sku; } /** *

* The SKU of the product. *

* * @param sku * The SKU of the product. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceDetails withSku(String sku) { setSku(sku); return this; } /** *

* The memory capacity of the Amazon Web Services instance. *

* * @param memory * The memory capacity of the Amazon Web Services instance. */ public void setMemory(String memory) { this.memory = memory; } /** *

* The memory capacity of the Amazon Web Services instance. *

* * @return The memory capacity of the Amazon Web Services instance. */ public String getMemory() { return this.memory; } /** *

* The memory capacity of the Amazon Web Services instance. *

* * @param memory * The memory capacity of the Amazon Web Services instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceDetails withMemory(String memory) { setMemory(memory); return this; } /** *

* The network performance capacity of the Amazon Web Services instance. *

* * @param networkPerformance * The network performance capacity of the Amazon Web Services instance. */ public void setNetworkPerformance(String networkPerformance) { this.networkPerformance = networkPerformance; } /** *

* The network performance capacity of the Amazon Web Services instance. *

* * @return The network performance capacity of the Amazon Web Services instance. */ public String getNetworkPerformance() { return this.networkPerformance; } /** *

* The network performance capacity of the Amazon Web Services instance. *

* * @param networkPerformance * The network performance capacity of the Amazon Web Services instance. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceDetails withNetworkPerformance(String networkPerformance) { setNetworkPerformance(networkPerformance); return this; } /** *

* The disk storage of the Amazon Web Services instance. This doesn't include EBS storage. *

* * @param storage * The disk storage of the Amazon Web Services instance. This doesn't include EBS storage. */ public void setStorage(String storage) { this.storage = storage; } /** *

* The disk storage of the Amazon Web Services instance. This doesn't include EBS storage. *

* * @return The disk storage of the Amazon Web Services instance. This doesn't include EBS storage. */ public String getStorage() { return this.storage; } /** *

* The disk storage of the Amazon Web Services instance. This doesn't include EBS storage. *

* * @param storage * The disk storage of the Amazon Web Services instance. This doesn't include EBS storage. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceDetails withStorage(String storage) { setStorage(storage); return this; } /** *

* The number of VCPU cores in the Amazon Web Services instance type. *

* * @param vcpu * The number of VCPU cores in the Amazon Web Services instance type. */ public void setVcpu(String vcpu) { this.vcpu = vcpu; } /** *

* The number of VCPU cores in the Amazon Web Services instance type. *

* * @return The number of VCPU cores in the Amazon Web Services instance type. */ public String getVcpu() { return this.vcpu; } /** *

* The number of VCPU cores in the Amazon Web Services instance type. *

* * @param vcpu * The number of VCPU cores in the Amazon Web Services instance type. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ResourceDetails withVcpu(String vcpu) { setVcpu(vcpu); 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 (getHourlyOnDemandRate() != null) sb.append("HourlyOnDemandRate: ").append(getHourlyOnDemandRate()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getPlatform() != null) sb.append("Platform: ").append(getPlatform()).append(","); if (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getSku() != null) sb.append("Sku: ").append(getSku()).append(","); if (getMemory() != null) sb.append("Memory: ").append(getMemory()).append(","); if (getNetworkPerformance() != null) sb.append("NetworkPerformance: ").append(getNetworkPerformance()).append(","); if (getStorage() != null) sb.append("Storage: ").append(getStorage()).append(","); if (getVcpu() != null) sb.append("Vcpu: ").append(getVcpu()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EC2ResourceDetails == false) return false; EC2ResourceDetails other = (EC2ResourceDetails) obj; if (other.getHourlyOnDemandRate() == null ^ this.getHourlyOnDemandRate() == null) return false; if (other.getHourlyOnDemandRate() != null && other.getHourlyOnDemandRate().equals(this.getHourlyOnDemandRate()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getPlatform() == null ^ this.getPlatform() == null) return false; if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getSku() == null ^ this.getSku() == null) return false; if (other.getSku() != null && other.getSku().equals(this.getSku()) == false) return false; if (other.getMemory() == null ^ this.getMemory() == null) return false; if (other.getMemory() != null && other.getMemory().equals(this.getMemory()) == false) return false; if (other.getNetworkPerformance() == null ^ this.getNetworkPerformance() == null) return false; if (other.getNetworkPerformance() != null && other.getNetworkPerformance().equals(this.getNetworkPerformance()) == false) return false; if (other.getStorage() == null ^ this.getStorage() == null) return false; if (other.getStorage() != null && other.getStorage().equals(this.getStorage()) == false) return false; if (other.getVcpu() == null ^ this.getVcpu() == null) return false; if (other.getVcpu() != null && other.getVcpu().equals(this.getVcpu()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHourlyOnDemandRate() == null) ? 0 : getHourlyOnDemandRate().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getSku() == null) ? 0 : getSku().hashCode()); hashCode = prime * hashCode + ((getMemory() == null) ? 0 : getMemory().hashCode()); hashCode = prime * hashCode + ((getNetworkPerformance() == null) ? 0 : getNetworkPerformance().hashCode()); hashCode = prime * hashCode + ((getStorage() == null) ? 0 : getStorage().hashCode()); hashCode = prime * hashCode + ((getVcpu() == null) ? 0 : getVcpu().hashCode()); return hashCode; } @Override public EC2ResourceDetails clone() { try { return (EC2ResourceDetails) 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.EC2ResourceDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy