/* * Copyright 2018-2023 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; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.ModifyCapacityReservationRequestMarshaller; /** * */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ModifyCapacityReservationRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest { /** *

* The ID of the Capacity Reservation. *

*/ private String capacityReservationId; /** *

* The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by * more than 1000 in a single request. *

*/ private Integer instanceCount; /** *

* The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved * capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to * expired when it reaches its end date and time. *

*

* The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify * 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019. *

*

* You must provide an EndDate value if EndDateType is limited. Omit * EndDate if EndDateType is unlimited. *

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

* Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following * end types: *

* */ private String endDateType; /** *

* Reserved. Capacity Reservations you have created are accepted by default. *

*/ private Boolean accept; /** *

* Reserved for future use. *

*/ private String additionalInfo; /** *

* 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 ModifyCapacityReservationRequest withCapacityReservationId(String capacityReservationId) { setCapacityReservationId(capacityReservationId); return this; } /** *

* The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by * more than 1000 in a single request. *

* * @param instanceCount * The number of instances for which to reserve capacity. The number of instances can't be increased or * decreased by more than 1000 in a single request. */ public void setInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; } /** *

* The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by * more than 1000 in a single request. *

* * @return The number of instances for which to reserve capacity. The number of instances can't be increased or * decreased by more than 1000 in a single request. */ public Integer getInstanceCount() { return this.instanceCount; } /** *

* The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by * more than 1000 in a single request. *

* * @param instanceCount * The number of instances for which to reserve capacity. The number of instances can't be increased or * decreased by more than 1000 in a single request. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyCapacityReservationRequest withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); return this; } /** *

* The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved * capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to * expired when it reaches its end date and time. *

*

* The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify * 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019. *

*

* You must provide an EndDate value if EndDateType is limited. Omit * EndDate if EndDateType is unlimited. *

* * @param endDate * The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the * reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's * state changes to expired when it reaches its end date and time.

*

* The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify * 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on * 5/31/2019. *

*

* You must provide an EndDate value if EndDateType is limited. Omit * EndDate if EndDateType is unlimited. */ public void setEndDate(java.util.Date endDate) { this.endDate = endDate; } /** *

* The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved * capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to * expired when it reaches its end date and time. *

*

* The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify * 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019. *

*

* You must provide an EndDate value if EndDateType is limited. Omit * EndDate if EndDateType is unlimited. *

* * @return The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the * reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's * state changes to expired when it reaches its end date and time.

*

* The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify * 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on * 5/31/2019. *

*

* You must provide an EndDate value if EndDateType is limited. Omit * EndDate if EndDateType is unlimited. */ public java.util.Date getEndDate() { return this.endDate; } /** *

* The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved * capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to * expired when it reaches its end date and time. *

*

* The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify * 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019. *

*

* You must provide an EndDate value if EndDateType is limited. Omit * EndDate if EndDateType is unlimited. *

* * @param endDate * The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the * reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's * state changes to expired when it reaches its end date and time.

*

* The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify * 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on * 5/31/2019. *

*

* You must provide an EndDate value if EndDateType is limited. Omit * EndDate if EndDateType is unlimited. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyCapacityReservationRequest withEndDate(java.util.Date endDate) { setEndDate(endDate); return this; } /** *

* Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following * end types: *

* * * @param endDateType * Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the * following end types:

*