/* * 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.AmazonWebServiceResult; /** * */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GetCapacityReservationUsageResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The token to use to retrieve the next page of results. This value is null when there are no more * results to return. *

*/ private String nextToken; /** *

* The ID of the Capacity Reservation. *

*/ private String capacityReservationId; /** *

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

*/ private String instanceType; /** *

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

*/ private Integer totalInstanceCount; /** *

* The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation. *

*/ private Integer availableInstanceCount; /** *

* The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states: *

* */ private String state; /** *

* Information about the Capacity Reservation usage. *

*/ private com.amazonaws.internal.SdkInternalList instanceUsages; /** *

* The token to use to retrieve the next page of results. This value is null when there are no more * results to return. *

* * @param nextToken * The token to use to retrieve the next page of results. This value is null when there are no * more results to return. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The token to use to retrieve the next page of results. This value is null when there are no more * results to return. *

* * @return The token to use to retrieve the next page of results. This value is null when there are no * more results to return. */ public String getNextToken() { return this.nextToken; } /** *

* The token to use to retrieve the next page of results. This value is null when there are no more * results to return. *

* * @param nextToken * The token to use to retrieve the next page of results. This value is null when there are no * more results to return. * @return Returns a reference to this object so that method calls can be chained together. */ public GetCapacityReservationUsageResult withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** *

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

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

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

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

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

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

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

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

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

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

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

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

* * @param totalInstanceCount * The 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 GetCapacityReservationUsageResult withTotalInstanceCount(Integer totalInstanceCount) { setTotalInstanceCount(totalInstanceCount); return this; } /** *

* The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation. *

* * @param availableInstanceCount * The remaining capacity. Indicates the number of instances that can be launched in the Capacity * Reservation. */ public void setAvailableInstanceCount(Integer availableInstanceCount) { this.availableInstanceCount = availableInstanceCount; } /** *

* The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation. *

* * @return The remaining capacity. Indicates the number of instances that can be launched in the Capacity * Reservation. */ public Integer getAvailableInstanceCount() { return this.availableInstanceCount; } /** *

* The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation. *

* * @param availableInstanceCount * The remaining capacity. Indicates the number of instances that can be launched in the Capacity * Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public GetCapacityReservationUsageResult withAvailableInstanceCount(Integer availableInstanceCount) { setAvailableInstanceCount(availableInstanceCount); return this; } /** *

* The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states: *

* * * @param state * The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following * states:

*