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

com.amazonaws.services.ec2.model.ModifyVpcEndpointRequest Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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 com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.ModifyVpcEndpointRequestMarshaller;

/**
 * 

* Contains the parameters for ModifyVpcEndpoint. *

*/ public class ModifyVpcEndpointRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest { /** *

* The ID of the endpoint. *

*/ private String vpcEndpointId; /** *

* Specify true to reset the policy document to the default * policy. The default policy allows access to the service. *

*/ private Boolean resetPolicy; /** *

* A policy document to attach to the endpoint. The policy must be in valid * JSON format. *

*/ private String policyDocument; /** *

* One or more route tables IDs to associate with the endpoint. *

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

* One or more route table IDs to disassociate from the endpoint. *

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

* The ID of the endpoint. *

* * @param vpcEndpointId * The ID of the endpoint. */ public void setVpcEndpointId(String vpcEndpointId) { this.vpcEndpointId = vpcEndpointId; } /** *

* The ID of the endpoint. *

* * @return The ID of the endpoint. */ public String getVpcEndpointId() { return this.vpcEndpointId; } /** *

* The ID of the endpoint. *

* * @param vpcEndpointId * The ID of the endpoint. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyVpcEndpointRequest withVpcEndpointId(String vpcEndpointId) { setVpcEndpointId(vpcEndpointId); return this; } /** *

* Specify true to reset the policy document to the default * policy. The default policy allows access to the service. *

* * @param resetPolicy * Specify true to reset the policy document to the * default policy. The default policy allows access to the service. */ public void setResetPolicy(Boolean resetPolicy) { this.resetPolicy = resetPolicy; } /** *

* Specify true to reset the policy document to the default * policy. The default policy allows access to the service. *

* * @return Specify true to reset the policy document to the * default policy. The default policy allows access to the service. */ public Boolean getResetPolicy() { return this.resetPolicy; } /** *

* Specify true to reset the policy document to the default * policy. The default policy allows access to the service. *

* * @param resetPolicy * Specify true to reset the policy document to the * default policy. The default policy allows access to the service. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyVpcEndpointRequest withResetPolicy(Boolean resetPolicy) { setResetPolicy(resetPolicy); return this; } /** *

* Specify true to reset the policy document to the default * policy. The default policy allows access to the service. *

* * @return Specify true to reset the policy document to the * default policy. The default policy allows access to the service. */ public Boolean isResetPolicy() { return this.resetPolicy; } /** *

* A policy document to attach to the endpoint. The policy must be in valid * JSON format. *

* * @param policyDocument * A policy document to attach to the endpoint. The policy must be in * valid JSON format. */ public void setPolicyDocument(String policyDocument) { this.policyDocument = policyDocument; } /** *

* A policy document to attach to the endpoint. The policy must be in valid * JSON format. *

* * @return A policy document to attach to the endpoint. The policy must be * in valid JSON format. */ public String getPolicyDocument() { return this.policyDocument; } /** *

* A policy document to attach to the endpoint. The policy must be in valid * JSON format. *

* * @param policyDocument * A policy document to attach to the endpoint. The policy must be in * valid JSON format. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyVpcEndpointRequest withPolicyDocument(String policyDocument) { setPolicyDocument(policyDocument); return this; } /** *

* One or more route tables IDs to associate with the endpoint. *

* * @return One or more route tables IDs to associate with the endpoint. */ public java.util.List getAddRouteTableIds() { if (addRouteTableIds == null) { addRouteTableIds = new com.amazonaws.internal.SdkInternalList(); } return addRouteTableIds; } /** *

* One or more route tables IDs to associate with the endpoint. *

* * @param addRouteTableIds * One or more route tables IDs to associate with the endpoint. */ public void setAddRouteTableIds( java.util.Collection addRouteTableIds) { if (addRouteTableIds == null) { this.addRouteTableIds = null; return; } this.addRouteTableIds = new com.amazonaws.internal.SdkInternalList( addRouteTableIds); } /** *

* One or more route tables IDs to associate with the endpoint. *

*

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

* * @param addRouteTableIds * One or more route tables IDs to associate with the endpoint. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyVpcEndpointRequest withAddRouteTableIds( String... addRouteTableIds) { if (this.addRouteTableIds == null) { setAddRouteTableIds(new com.amazonaws.internal.SdkInternalList( addRouteTableIds.length)); } for (String ele : addRouteTableIds) { this.addRouteTableIds.add(ele); } return this; } /** *

* One or more route tables IDs to associate with the endpoint. *

* * @param addRouteTableIds * One or more route tables IDs to associate with the endpoint. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyVpcEndpointRequest withAddRouteTableIds( java.util.Collection addRouteTableIds) { setAddRouteTableIds(addRouteTableIds); return this; } /** *

* One or more route table IDs to disassociate from the endpoint. *

* * @return One or more route table IDs to disassociate from the endpoint. */ public java.util.List getRemoveRouteTableIds() { if (removeRouteTableIds == null) { removeRouteTableIds = new com.amazonaws.internal.SdkInternalList(); } return removeRouteTableIds; } /** *

* One or more route table IDs to disassociate from the endpoint. *

* * @param removeRouteTableIds * One or more route table IDs to disassociate from the endpoint. */ public void setRemoveRouteTableIds( java.util.Collection removeRouteTableIds) { if (removeRouteTableIds == null) { this.removeRouteTableIds = null; return; } this.removeRouteTableIds = new com.amazonaws.internal.SdkInternalList( removeRouteTableIds); } /** *

* One or more route table IDs to disassociate from the endpoint. *

*

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

* * @param removeRouteTableIds * One or more route table IDs to disassociate from the endpoint. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyVpcEndpointRequest withRemoveRouteTableIds( String... removeRouteTableIds) { if (this.removeRouteTableIds == null) { setRemoveRouteTableIds(new com.amazonaws.internal.SdkInternalList( removeRouteTableIds.length)); } for (String ele : removeRouteTableIds) { this.removeRouteTableIds.add(ele); } return this; } /** *

* One or more route table IDs to disassociate from the endpoint. *

* * @param removeRouteTableIds * One or more route table IDs to disassociate from the endpoint. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyVpcEndpointRequest withRemoveRouteTableIds( java.util.Collection removeRouteTableIds) { setRemoveRouteTableIds(removeRouteTableIds); 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 ModifyVpcEndpointRequestMarshaller() .marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getVpcEndpointId() != null) sb.append("VpcEndpointId: " + getVpcEndpointId() + ","); if (getResetPolicy() != null) sb.append("ResetPolicy: " + getResetPolicy() + ","); if (getPolicyDocument() != null) sb.append("PolicyDocument: " + getPolicyDocument() + ","); if (getAddRouteTableIds() != null) sb.append("AddRouteTableIds: " + getAddRouteTableIds() + ","); if (getRemoveRouteTableIds() != null) sb.append("RemoveRouteTableIds: " + getRemoveRouteTableIds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ModifyVpcEndpointRequest == false) return false; ModifyVpcEndpointRequest other = (ModifyVpcEndpointRequest) obj; if (other.getVpcEndpointId() == null ^ this.getVpcEndpointId() == null) return false; if (other.getVpcEndpointId() != null && other.getVpcEndpointId().equals(this.getVpcEndpointId()) == false) return false; if (other.getResetPolicy() == null ^ this.getResetPolicy() == null) return false; if (other.getResetPolicy() != null && other.getResetPolicy().equals(this.getResetPolicy()) == false) return false; if (other.getPolicyDocument() == null ^ this.getPolicyDocument() == null) return false; if (other.getPolicyDocument() != null && other.getPolicyDocument().equals(this.getPolicyDocument()) == false) return false; if (other.getAddRouteTableIds() == null ^ this.getAddRouteTableIds() == null) return false; if (other.getAddRouteTableIds() != null && other.getAddRouteTableIds().equals( this.getAddRouteTableIds()) == false) return false; if (other.getRemoveRouteTableIds() == null ^ this.getRemoveRouteTableIds() == null) return false; if (other.getRemoveRouteTableIds() != null && other.getRemoveRouteTableIds().equals( this.getRemoveRouteTableIds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVpcEndpointId() == null) ? 0 : getVpcEndpointId() .hashCode()); hashCode = prime * hashCode + ((getResetPolicy() == null) ? 0 : getResetPolicy().hashCode()); hashCode = prime * hashCode + ((getPolicyDocument() == null) ? 0 : getPolicyDocument() .hashCode()); hashCode = prime * hashCode + ((getAddRouteTableIds() == null) ? 0 : getAddRouteTableIds() .hashCode()); hashCode = prime * hashCode + ((getRemoveRouteTableIds() == null) ? 0 : getRemoveRouteTableIds().hashCode()); return hashCode; } @Override public ModifyVpcEndpointRequest clone() { return (ModifyVpcEndpointRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy