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

com.amazonaws.services.networkmanager.model.UpdateVpcAttachmentRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Network Manager module holds the client classes that are used for communicating with AWS Network Manager Service

There is a newer version: 1.12.772
Show 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.networkmanager.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateVpcAttachmentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The ID of the attachment. *

*/ private String attachmentId; /** *

* Adds a subnet ARN to the VPC attachment. *

*/ private java.util.List addSubnetArns; /** *

* Removes a subnet ARN from the attachment. *

*/ private java.util.List removeSubnetArns; /** *

* Additional options for updating the VPC attachment. *

*/ private VpcOptions options; /** *

* The ID of the attachment. *

* * @param attachmentId * The ID of the attachment. */ public void setAttachmentId(String attachmentId) { this.attachmentId = attachmentId; } /** *

* The ID of the attachment. *

* * @return The ID of the attachment. */ public String getAttachmentId() { return this.attachmentId; } /** *

* The ID of the attachment. *

* * @param attachmentId * The ID of the attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateVpcAttachmentRequest withAttachmentId(String attachmentId) { setAttachmentId(attachmentId); return this; } /** *

* Adds a subnet ARN to the VPC attachment. *

* * @return Adds a subnet ARN to the VPC attachment. */ public java.util.List getAddSubnetArns() { return addSubnetArns; } /** *

* Adds a subnet ARN to the VPC attachment. *

* * @param addSubnetArns * Adds a subnet ARN to the VPC attachment. */ public void setAddSubnetArns(java.util.Collection addSubnetArns) { if (addSubnetArns == null) { this.addSubnetArns = null; return; } this.addSubnetArns = new java.util.ArrayList(addSubnetArns); } /** *

* Adds a subnet ARN to the VPC attachment. *

*

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

* * @param addSubnetArns * Adds a subnet ARN to the VPC attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateVpcAttachmentRequest withAddSubnetArns(String... addSubnetArns) { if (this.addSubnetArns == null) { setAddSubnetArns(new java.util.ArrayList(addSubnetArns.length)); } for (String ele : addSubnetArns) { this.addSubnetArns.add(ele); } return this; } /** *

* Adds a subnet ARN to the VPC attachment. *

* * @param addSubnetArns * Adds a subnet ARN to the VPC attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateVpcAttachmentRequest withAddSubnetArns(java.util.Collection addSubnetArns) { setAddSubnetArns(addSubnetArns); return this; } /** *

* Removes a subnet ARN from the attachment. *

* * @return Removes a subnet ARN from the attachment. */ public java.util.List getRemoveSubnetArns() { return removeSubnetArns; } /** *

* Removes a subnet ARN from the attachment. *

* * @param removeSubnetArns * Removes a subnet ARN from the attachment. */ public void setRemoveSubnetArns(java.util.Collection removeSubnetArns) { if (removeSubnetArns == null) { this.removeSubnetArns = null; return; } this.removeSubnetArns = new java.util.ArrayList(removeSubnetArns); } /** *

* Removes a subnet ARN from the attachment. *

*

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

* * @param removeSubnetArns * Removes a subnet ARN from the attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateVpcAttachmentRequest withRemoveSubnetArns(String... removeSubnetArns) { if (this.removeSubnetArns == null) { setRemoveSubnetArns(new java.util.ArrayList(removeSubnetArns.length)); } for (String ele : removeSubnetArns) { this.removeSubnetArns.add(ele); } return this; } /** *

* Removes a subnet ARN from the attachment. *

* * @param removeSubnetArns * Removes a subnet ARN from the attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateVpcAttachmentRequest withRemoveSubnetArns(java.util.Collection removeSubnetArns) { setRemoveSubnetArns(removeSubnetArns); return this; } /** *

* Additional options for updating the VPC attachment. *

* * @param options * Additional options for updating the VPC attachment. */ public void setOptions(VpcOptions options) { this.options = options; } /** *

* Additional options for updating the VPC attachment. *

* * @return Additional options for updating the VPC attachment. */ public VpcOptions getOptions() { return this.options; } /** *

* Additional options for updating the VPC attachment. *

* * @param options * Additional options for updating the VPC attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateVpcAttachmentRequest withOptions(VpcOptions options) { setOptions(options); return this; } /** * 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 (getAttachmentId() != null) sb.append("AttachmentId: ").append(getAttachmentId()).append(","); if (getAddSubnetArns() != null) sb.append("AddSubnetArns: ").append(getAddSubnetArns()).append(","); if (getRemoveSubnetArns() != null) sb.append("RemoveSubnetArns: ").append(getRemoveSubnetArns()).append(","); if (getOptions() != null) sb.append("Options: ").append(getOptions()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateVpcAttachmentRequest == false) return false; UpdateVpcAttachmentRequest other = (UpdateVpcAttachmentRequest) obj; if (other.getAttachmentId() == null ^ this.getAttachmentId() == null) return false; if (other.getAttachmentId() != null && other.getAttachmentId().equals(this.getAttachmentId()) == false) return false; if (other.getAddSubnetArns() == null ^ this.getAddSubnetArns() == null) return false; if (other.getAddSubnetArns() != null && other.getAddSubnetArns().equals(this.getAddSubnetArns()) == false) return false; if (other.getRemoveSubnetArns() == null ^ this.getRemoveSubnetArns() == null) return false; if (other.getRemoveSubnetArns() != null && other.getRemoveSubnetArns().equals(this.getRemoveSubnetArns()) == false) return false; if (other.getOptions() == null ^ this.getOptions() == null) return false; if (other.getOptions() != null && other.getOptions().equals(this.getOptions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttachmentId() == null) ? 0 : getAttachmentId().hashCode()); hashCode = prime * hashCode + ((getAddSubnetArns() == null) ? 0 : getAddSubnetArns().hashCode()); hashCode = prime * hashCode + ((getRemoveSubnetArns() == null) ? 0 : getRemoveSubnetArns().hashCode()); hashCode = prime * hashCode + ((getOptions() == null) ? 0 : getOptions().hashCode()); return hashCode; } @Override public UpdateVpcAttachmentRequest clone() { return (UpdateVpcAttachmentRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy