/* * 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; /** *
* Describes a launch request for one or more instances, and includes owner, requester, and security group information * that applies to all instances in the launch request. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Reservation implements Serializable, Cloneable { /** ** Not supported. *
*/ private com.amazonaws.internal.SdkInternalList* The instances. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the Amazon Web Services account that owns the reservation. *
*/ private String ownerId; /** ** The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management * Console or Auto Scaling). *
*/ private String requesterId; /** ** The ID of the reservation. *
*/ private String reservationId; /** ** One or more security group names. *
*/ private com.amazonaws.internal.SdkInternalList* Not supported. *
* * @return Not supported. */ public java.util.List* Not supported. *
* * @param groups * Not supported. */ public void setGroups(java.util.Collection* Not supported. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setGroups(java.util.Collection)} or {@link #withGroups(java.util.Collection)} if you want to override the * existing values. *
* * @param groups * Not supported. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroups(GroupIdentifier... groups) { if (this.groups == null) { setGroups(new com.amazonaws.internal.SdkInternalList* Not supported. *
* * @param groups * Not supported. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroups(java.util.Collection* The instances. *
* * @return The instances. */ public java.util.List* The instances. *
* * @param instances * The instances. */ public void setInstances(java.util.Collection* The instances. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setInstances(java.util.Collection)} or {@link #withInstances(java.util.Collection)} if you want to * override the existing values. *
* * @param instances * The instances. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withInstances(Instance... instances) { if (this.instances == null) { setInstances(new com.amazonaws.internal.SdkInternalList* The instances. *
* * @param instances * The instances. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withInstances(java.util.Collection* The ID of the Amazon Web Services account that owns the reservation. *
* * @param ownerId * The ID of the Amazon Web Services account that owns the reservation. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** ** The ID of the Amazon Web Services account that owns the reservation. *
* * @return The ID of the Amazon Web Services account that owns the reservation. */ public String getOwnerId() { return this.ownerId; } /** ** The ID of the Amazon Web Services account that owns the reservation. *
* * @param ownerId * The ID of the Amazon Web Services account that owns the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** ** The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management * Console or Auto Scaling). *
* * @param requesterId * The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services * Management Console or Auto Scaling). */ public void setRequesterId(String requesterId) { this.requesterId = requesterId; } /** ** The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management * Console or Auto Scaling). *
* * @return The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services * Management Console or Auto Scaling). */ public String getRequesterId() { return this.requesterId; } /** ** The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management * Console or Auto Scaling). *
* * @param requesterId * The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services * Management Console or Auto Scaling). * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withRequesterId(String requesterId) { setRequesterId(requesterId); return this; } /** ** The ID of the reservation. *
* * @param reservationId * The ID of the reservation. */ public void setReservationId(String reservationId) { this.reservationId = reservationId; } /** ** The ID of the reservation. *
* * @return The ID of the reservation. */ public String getReservationId() { return this.reservationId; } /** ** The ID of the reservation. *
* * @param reservationId * The ID of the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withReservationId(String reservationId) { setReservationId(reservationId); return this; } /** ** One or more security group names. *
* * @return One or more security group names. */ public java.util.List* One or more security group names. *
* * @param groupNames * One or more security group names. */ public void setGroupNames(java.util.Collection* One or more security group names. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setGroupNames(java.util.Collection)} or {@link #withGroupNames(java.util.Collection)} if you want to * override the existing values. *
* * @param groupNames * One or more security group names. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroupNames(String... groupNames) { if (this.groupNames == null) { setGroupNames(new com.amazonaws.internal.SdkInternalList* One or more security group names. *
* * @param groupNames * One or more security group names. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroupNames(java.util.Collection