/*
* 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.
*
* The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by
* more than
* 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
*
* 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
* Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following
* end types:
*
*
*
* Reserved. Capacity Reservations you have created are accepted by default.
*
* Reserved for future use.
*
* The ID of the Capacity Reservation.
*
* The ID of the Capacity Reservation.
*
* The ID of the Capacity Reservation.
*
* The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by
* more than
* The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by
* more than
* The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by
* more than
* 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
*
* 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 1000
in a single request.
* expired
when it reaches its end date and time.
* EndDate
value if EndDateType
is limited
. Omit
* EndDate
if EndDateType
is unlimited
.
*
*
*/
private String endDateType;
/**
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not provide
* an EndDate
value if EndDateType
is unlimited
.
* limited
- The Capacity Reservation expires automatically at a specified date and time. You must
* provide an EndDate
value if EndDateType
is limited
.
* 1000
in a single request.
* 1000
in a single request.
*/
public void setInstanceCount(Integer instanceCount) {
this.instanceCount = instanceCount;
}
/**
* 1000
in a single request.
* 1000
in a single request.
*/
public Integer getInstanceCount() {
return this.instanceCount;
}
/**
* 1000
in a single request.
* 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;
}
/**
* expired
when it reaches its end date and time.
* EndDate
value if EndDateType
is limited
. Omit
* EndDate
if EndDateType
is unlimited
.
* 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
.
*
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
.
*
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: *
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not provide
* an EndDate
value if EndDateType
is unlimited
.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time. You must
* provide an EndDate
value if EndDateType
is limited
.
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not
* provide an EndDate
value if EndDateType
is unlimited
.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time. You
* must provide an EndDate
value if EndDateType
is limited
.
*
* Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following * end types: *
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not provide
* an EndDate
value if EndDateType
is unlimited
.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time. You must
* provide an EndDate
value if EndDateType
is limited
.
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not
* provide an EndDate
value if EndDateType
is unlimited
.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time. You
* must provide an EndDate
value if EndDateType
is limited
.
*
* Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following * end types: *
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not provide
* an EndDate
value if EndDateType
is unlimited
.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time. You must
* provide an EndDate
value if EndDateType
is limited
.
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not
* provide an EndDate
value if EndDateType
is unlimited
.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time. You
* must provide an EndDate
value if EndDateType
is limited
.
*
* Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following * end types: *
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not provide
* an EndDate
value if EndDateType
is unlimited
.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time. You must
* provide an EndDate
value if EndDateType
is limited
.
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not
* provide an EndDate
value if EndDateType
is unlimited
.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time. You
* must provide an EndDate
value if EndDateType
is limited
.
*
* Reserved. Capacity Reservations you have created are accepted by default. *
* * @param accept * Reserved. Capacity Reservations you have created are accepted by default. */ public void setAccept(Boolean accept) { this.accept = accept; } /** ** Reserved. Capacity Reservations you have created are accepted by default. *
* * @return Reserved. Capacity Reservations you have created are accepted by default. */ public Boolean getAccept() { return this.accept; } /** ** Reserved. Capacity Reservations you have created are accepted by default. *
* * @param accept * Reserved. Capacity Reservations you have created are accepted by default. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyCapacityReservationRequest withAccept(Boolean accept) { setAccept(accept); return this; } /** ** Reserved. Capacity Reservations you have created are accepted by default. *
* * @return Reserved. Capacity Reservations you have created are accepted by default. */ public Boolean isAccept() { return this.accept; } /** ** Reserved for future use. *
* * @param additionalInfo * Reserved for future use. */ public void setAdditionalInfo(String additionalInfo) { this.additionalInfo = additionalInfo; } /** ** Reserved for future use. *
* * @return Reserved for future use. */ public String getAdditionalInfo() { return this.additionalInfo; } /** ** Reserved for future use. *
* * @param additionalInfo * Reserved for future use. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyCapacityReservationRequest withAdditionalInfo(String additionalInfo) { setAdditionalInfo(additionalInfo); return this; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request