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

com.amazonaws.services.ec2.model.EnableFastSnapshotRestoresRequest 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;

import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.EnableFastSnapshotRestoresRequestMarshaller;

/**
 * 
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EnableFastSnapshotRestoresRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
        DryRunSupportedRequest {

    /**
     * 

* One or more Availability Zones. For example, us-east-2a. *

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

* The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a snapshot * that was shared with you from another Amazon Web Services account. *

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

* One or more Availability Zones. For example, us-east-2a. *

* * @return One or more Availability Zones. For example, us-east-2a. */ public java.util.List getAvailabilityZones() { if (availabilityZones == null) { availabilityZones = new com.amazonaws.internal.SdkInternalList(); } return availabilityZones; } /** *

* One or more Availability Zones. For example, us-east-2a. *

* * @param availabilityZones * One or more Availability Zones. For example, us-east-2a. */ public void setAvailabilityZones(java.util.Collection availabilityZones) { if (availabilityZones == null) { this.availabilityZones = null; return; } this.availabilityZones = new com.amazonaws.internal.SdkInternalList(availabilityZones); } /** *

* One or more Availability Zones. For example, us-east-2a. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAvailabilityZones(java.util.Collection)} or {@link #withAvailabilityZones(java.util.Collection)} if * you want to override the existing values. *

* * @param availabilityZones * One or more Availability Zones. For example, us-east-2a. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoresRequest withAvailabilityZones(String... availabilityZones) { if (this.availabilityZones == null) { setAvailabilityZones(new com.amazonaws.internal.SdkInternalList(availabilityZones.length)); } for (String ele : availabilityZones) { this.availabilityZones.add(ele); } return this; } /** *

* One or more Availability Zones. For example, us-east-2a. *

* * @param availabilityZones * One or more Availability Zones. For example, us-east-2a. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoresRequest withAvailabilityZones(java.util.Collection availabilityZones) { setAvailabilityZones(availabilityZones); return this; } /** *

* The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a snapshot * that was shared with you from another Amazon Web Services account. *

* * @return The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a * snapshot that was shared with you from another Amazon Web Services account. */ public java.util.List getSourceSnapshotIds() { if (sourceSnapshotIds == null) { sourceSnapshotIds = new com.amazonaws.internal.SdkInternalList(); } return sourceSnapshotIds; } /** *

* The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a snapshot * that was shared with you from another Amazon Web Services account. *

* * @param sourceSnapshotIds * The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a * snapshot that was shared with you from another Amazon Web Services account. */ public void setSourceSnapshotIds(java.util.Collection sourceSnapshotIds) { if (sourceSnapshotIds == null) { this.sourceSnapshotIds = null; return; } this.sourceSnapshotIds = new com.amazonaws.internal.SdkInternalList(sourceSnapshotIds); } /** *

* The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a snapshot * that was shared with you from another Amazon Web Services account. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSourceSnapshotIds(java.util.Collection)} or {@link #withSourceSnapshotIds(java.util.Collection)} if * you want to override the existing values. *

* * @param sourceSnapshotIds * The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a * snapshot that was shared with you from another Amazon Web Services account. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoresRequest withSourceSnapshotIds(String... sourceSnapshotIds) { if (this.sourceSnapshotIds == null) { setSourceSnapshotIds(new com.amazonaws.internal.SdkInternalList(sourceSnapshotIds.length)); } for (String ele : sourceSnapshotIds) { this.sourceSnapshotIds.add(ele); } return this; } /** *

* The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a snapshot * that was shared with you from another Amazon Web Services account. *

* * @param sourceSnapshotIds * The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a * snapshot that was shared with you from another Amazon Web Services account. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableFastSnapshotRestoresRequest withSourceSnapshotIds(java.util.Collection sourceSnapshotIds) { setSourceSnapshotIds(sourceSnapshotIds); 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 getDryRunRequest() { Request request = new EnableFastSnapshotRestoresRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * 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 (getAvailabilityZones() != null) sb.append("AvailabilityZones: ").append(getAvailabilityZones()).append(","); if (getSourceSnapshotIds() != null) sb.append("SourceSnapshotIds: ").append(getSourceSnapshotIds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EnableFastSnapshotRestoresRequest == false) return false; EnableFastSnapshotRestoresRequest other = (EnableFastSnapshotRestoresRequest) obj; if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == null) return false; if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == false) return false; if (other.getSourceSnapshotIds() == null ^ this.getSourceSnapshotIds() == null) return false; if (other.getSourceSnapshotIds() != null && other.getSourceSnapshotIds().equals(this.getSourceSnapshotIds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode()); hashCode = prime * hashCode + ((getSourceSnapshotIds() == null) ? 0 : getSourceSnapshotIds().hashCode()); return hashCode; } @Override public EnableFastSnapshotRestoresRequest clone() { return (EnableFastSnapshotRestoresRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy