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

com.amazonaws.services.ec2.model.FleetCapacityReservation Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

The newest version!
/*
 * Copyright 2019-2024 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.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Information about a Capacity Reservation in a Capacity Reservation Fleet. *

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

* The ID of the Capacity Reservation. *

*/ private String capacityReservationId; /** *

* The ID of the Availability Zone in which the Capacity Reservation reserves capacity. *

*/ private String availabilityZoneId; /** *

* The instance type for which the Capacity Reservation reserves capacity. *

*/ private String instanceType; /** *

* The type of operating system for which the Capacity Reservation reserves capacity. *

*/ private String instancePlatform; /** *

* The Availability Zone in which the Capacity Reservation reserves capacity. *

*/ private String availabilityZone; /** *

* The total number of instances for which the Capacity Reservation reserves capacity. *

*/ private Integer totalInstanceCount; /** *

* The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target * capacity in the Amazon EC2 User Guide. *

*/ private Double fulfilledCapacity; /** *

* Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types. *

*/ private Boolean ebsOptimized; /** *

* The date and time at which the Capacity Reservation was created. *

*/ private java.util.Date createDate; /** *

* The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type * weight in the Amazon EC2 User Guide. *

*/ private Double weight; /** *

* The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type * priority in the Amazon EC2 User Guide. *

*/ private Integer priority; /** *

* The ID of the Capacity Reservation. *

* * @param capacityReservationId * The ID of the Capacity Reservation. */ public void setCapacityReservationId(String capacityReservationId) { this.capacityReservationId = capacityReservationId; } /** *

* The ID of the Capacity Reservation. *

* * @return The ID of the Capacity Reservation. */ public String getCapacityReservationId() { return this.capacityReservationId; } /** *

* The ID of the Capacity Reservation. *

* * @param capacityReservationId * The ID of the Capacity Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public FleetCapacityReservation withCapacityReservationId(String capacityReservationId) { setCapacityReservationId(capacityReservationId); return this; } /** *

* The ID of the Availability Zone in which the Capacity Reservation reserves capacity. *

* * @param availabilityZoneId * The ID of the Availability Zone in which the Capacity Reservation reserves capacity. */ public void setAvailabilityZoneId(String availabilityZoneId) { this.availabilityZoneId = availabilityZoneId; } /** *

* The ID of the Availability Zone in which the Capacity Reservation reserves capacity. *

* * @return The ID of the Availability Zone in which the Capacity Reservation reserves capacity. */ public String getAvailabilityZoneId() { return this.availabilityZoneId; } /** *

* The ID of the Availability Zone in which the Capacity Reservation reserves capacity. *

* * @param availabilityZoneId * The ID of the Availability Zone in which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. */ public FleetCapacityReservation withAvailabilityZoneId(String availabilityZoneId) { setAvailabilityZoneId(availabilityZoneId); return this; } /** *

* The instance type for which the Capacity Reservation reserves capacity. *

* * @param instanceType * The instance type for which the Capacity Reservation reserves capacity. * @see InstanceType */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The instance type for which the Capacity Reservation reserves capacity. *

* * @return The instance type for which the Capacity Reservation reserves capacity. * @see InstanceType */ public String getInstanceType() { return this.instanceType; } /** *

* The instance type for which the Capacity Reservation reserves capacity. *

* * @param instanceType * The instance type for which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceType */ public FleetCapacityReservation withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

* The instance type for which the Capacity Reservation reserves capacity. *

* * @param instanceType * The instance type for which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceType */ public FleetCapacityReservation withInstanceType(InstanceType instanceType) { this.instanceType = instanceType.toString(); return this; } /** *

* The type of operating system for which the Capacity Reservation reserves capacity. *

* * @param instancePlatform * The type of operating system for which the Capacity Reservation reserves capacity. * @see CapacityReservationInstancePlatform */ public void setInstancePlatform(String instancePlatform) { this.instancePlatform = instancePlatform; } /** *

* The type of operating system for which the Capacity Reservation reserves capacity. *

* * @return The type of operating system for which the Capacity Reservation reserves capacity. * @see CapacityReservationInstancePlatform */ public String getInstancePlatform() { return this.instancePlatform; } /** *

* The type of operating system for which the Capacity Reservation reserves capacity. *

* * @param instancePlatform * The type of operating system for which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. * @see CapacityReservationInstancePlatform */ public FleetCapacityReservation withInstancePlatform(String instancePlatform) { setInstancePlatform(instancePlatform); return this; } /** *

* The type of operating system for which the Capacity Reservation reserves capacity. *

* * @param instancePlatform * The type of operating system for which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. * @see CapacityReservationInstancePlatform */ public FleetCapacityReservation withInstancePlatform(CapacityReservationInstancePlatform instancePlatform) { this.instancePlatform = instancePlatform.toString(); return this; } /** *

* The Availability Zone in which the Capacity Reservation reserves capacity. *

* * @param availabilityZone * The Availability Zone in which the Capacity Reservation reserves capacity. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** *

* The Availability Zone in which the Capacity Reservation reserves capacity. *

* * @return The Availability Zone in which the Capacity Reservation reserves capacity. */ public String getAvailabilityZone() { return this.availabilityZone; } /** *

* The Availability Zone in which the Capacity Reservation reserves capacity. *

* * @param availabilityZone * The Availability Zone in which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. */ public FleetCapacityReservation withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** *

* The total number of instances for which the Capacity Reservation reserves capacity. *

* * @param totalInstanceCount * The total number of instances for which the Capacity Reservation reserves capacity. */ public void setTotalInstanceCount(Integer totalInstanceCount) { this.totalInstanceCount = totalInstanceCount; } /** *

* The total number of instances for which the Capacity Reservation reserves capacity. *

* * @return The total number of instances for which the Capacity Reservation reserves capacity. */ public Integer getTotalInstanceCount() { return this.totalInstanceCount; } /** *

* The total number of instances for which the Capacity Reservation reserves capacity. *

* * @param totalInstanceCount * The total number of instances for which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. */ public FleetCapacityReservation withTotalInstanceCount(Integer totalInstanceCount) { setTotalInstanceCount(totalInstanceCount); return this; } /** *

* The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target * capacity in the Amazon EC2 User Guide. *

* * @param fulfilledCapacity * The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total * target capacity in the Amazon EC2 User Guide. */ public void setFulfilledCapacity(Double fulfilledCapacity) { this.fulfilledCapacity = fulfilledCapacity; } /** *

* The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target * capacity in the Amazon EC2 User Guide. *

* * @return The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total * target capacity in the Amazon EC2 User Guide. */ public Double getFulfilledCapacity() { return this.fulfilledCapacity; } /** *

* The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target * capacity in the Amazon EC2 User Guide. *

* * @param fulfilledCapacity * The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total * target capacity in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public FleetCapacityReservation withFulfilledCapacity(Double fulfilledCapacity) { setFulfilledCapacity(fulfilledCapacity); return this; } /** *

* Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types. *

* * @param ebsOptimized * Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types. */ public void setEbsOptimized(Boolean ebsOptimized) { this.ebsOptimized = ebsOptimized; } /** *

* Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types. *

* * @return Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types. */ public Boolean getEbsOptimized() { return this.ebsOptimized; } /** *

* Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types. *

* * @param ebsOptimized * Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types. * @return Returns a reference to this object so that method calls can be chained together. */ public FleetCapacityReservation withEbsOptimized(Boolean ebsOptimized) { setEbsOptimized(ebsOptimized); return this; } /** *

* Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types. *

* * @return Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types. */ public Boolean isEbsOptimized() { return this.ebsOptimized; } /** *

* The date and time at which the Capacity Reservation was created. *

* * @param createDate * The date and time at which the Capacity Reservation was created. */ public void setCreateDate(java.util.Date createDate) { this.createDate = createDate; } /** *

* The date and time at which the Capacity Reservation was created. *

* * @return The date and time at which the Capacity Reservation was created. */ public java.util.Date getCreateDate() { return this.createDate; } /** *

* The date and time at which the Capacity Reservation was created. *

* * @param createDate * The date and time at which the Capacity Reservation was created. * @return Returns a reference to this object so that method calls can be chained together. */ public FleetCapacityReservation withCreateDate(java.util.Date createDate) { setCreateDate(createDate); return this; } /** *

* The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type * weight in the Amazon EC2 User Guide. *

* * @param weight * The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance * type weight in the Amazon EC2 User Guide. */ public void setWeight(Double weight) { this.weight = weight; } /** *

* The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type * weight in the Amazon EC2 User Guide. *

* * @return The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance * type weight in the Amazon EC2 User Guide. */ public Double getWeight() { return this.weight; } /** *

* The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type * weight in the Amazon EC2 User Guide. *

* * @param weight * The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance * type weight in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public FleetCapacityReservation withWeight(Double weight) { setWeight(weight); return this; } /** *

* The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type * priority in the Amazon EC2 User Guide. *

* * @param priority * The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide. */ public void setPriority(Integer priority) { this.priority = priority; } /** *

* The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type * priority in the Amazon EC2 User Guide. *

* * @return The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide. */ public Integer getPriority() { return this.priority; } /** *

* The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type * priority in the Amazon EC2 User Guide. *

* * @param priority * The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public FleetCapacityReservation withPriority(Integer priority) { setPriority(priority); 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 (getCapacityReservationId() != null) sb.append("CapacityReservationId: ").append(getCapacityReservationId()).append(","); if (getAvailabilityZoneId() != null) sb.append("AvailabilityZoneId: ").append(getAvailabilityZoneId()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getInstancePlatform() != null) sb.append("InstancePlatform: ").append(getInstancePlatform()).append(","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getTotalInstanceCount() != null) sb.append("TotalInstanceCount: ").append(getTotalInstanceCount()).append(","); if (getFulfilledCapacity() != null) sb.append("FulfilledCapacity: ").append(getFulfilledCapacity()).append(","); if (getEbsOptimized() != null) sb.append("EbsOptimized: ").append(getEbsOptimized()).append(","); if (getCreateDate() != null) sb.append("CreateDate: ").append(getCreateDate()).append(","); if (getWeight() != null) sb.append("Weight: ").append(getWeight()).append(","); if (getPriority() != null) sb.append("Priority: ").append(getPriority()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FleetCapacityReservation == false) return false; FleetCapacityReservation other = (FleetCapacityReservation) obj; if (other.getCapacityReservationId() == null ^ this.getCapacityReservationId() == null) return false; if (other.getCapacityReservationId() != null && other.getCapacityReservationId().equals(this.getCapacityReservationId()) == false) return false; if (other.getAvailabilityZoneId() == null ^ this.getAvailabilityZoneId() == null) return false; if (other.getAvailabilityZoneId() != null && other.getAvailabilityZoneId().equals(this.getAvailabilityZoneId()) == 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.getInstancePlatform() == null ^ this.getInstancePlatform() == null) return false; if (other.getInstancePlatform() != null && other.getInstancePlatform().equals(this.getInstancePlatform()) == false) return false; if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false) return false; if (other.getTotalInstanceCount() == null ^ this.getTotalInstanceCount() == null) return false; if (other.getTotalInstanceCount() != null && other.getTotalInstanceCount().equals(this.getTotalInstanceCount()) == false) return false; if (other.getFulfilledCapacity() == null ^ this.getFulfilledCapacity() == null) return false; if (other.getFulfilledCapacity() != null && other.getFulfilledCapacity().equals(this.getFulfilledCapacity()) == false) return false; if (other.getEbsOptimized() == null ^ this.getEbsOptimized() == null) return false; if (other.getEbsOptimized() != null && other.getEbsOptimized().equals(this.getEbsOptimized()) == false) return false; if (other.getCreateDate() == null ^ this.getCreateDate() == null) return false; if (other.getCreateDate() != null && other.getCreateDate().equals(this.getCreateDate()) == false) return false; if (other.getWeight() == null ^ this.getWeight() == null) return false; if (other.getWeight() != null && other.getWeight().equals(this.getWeight()) == false) return false; if (other.getPriority() == null ^ this.getPriority() == null) return false; if (other.getPriority() != null && other.getPriority().equals(this.getPriority()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCapacityReservationId() == null) ? 0 : getCapacityReservationId().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZoneId() == null) ? 0 : getAvailabilityZoneId().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getInstancePlatform() == null) ? 0 : getInstancePlatform().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getTotalInstanceCount() == null) ? 0 : getTotalInstanceCount().hashCode()); hashCode = prime * hashCode + ((getFulfilledCapacity() == null) ? 0 : getFulfilledCapacity().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getWeight() == null) ? 0 : getWeight().hashCode()); hashCode = prime * hashCode + ((getPriority() == null) ? 0 : getPriority().hashCode()); return hashCode; } @Override public FleetCapacityReservation clone() { try { return (FleetCapacityReservation) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy