Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 
 
Container for the parameters to the ModifyVpcEndpoint operation.

Modifies attributes of a specified VPC endpoint. You can modify the policy associated with the endpoint, and you can add and remove route tables associated with the endpoint.

 
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.
 
One or more route table IDs to disassociate from the endpoint.
 
The ID of the endpoint.

Returns:
The ID of the endpoint.
 
     public String getVpcEndpointId() {
         return ;
     }
    
    
The ID of the endpoint.

Parameters:
vpcEndpointId The ID of the endpoint.
 
     public void setVpcEndpointId(String vpcEndpointId) {
         this. = vpcEndpointId;
     }
    
    
The ID of the endpoint.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpcEndpointId The ID of the endpoint.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyVpcEndpointRequest withVpcEndpointId(String vpcEndpointId) {
         this. = vpcEndpointId;
         return this;
     }

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

Returns:
Specify true to reset the policy document to the default policy. The default policy allows access to the service.
    public Boolean isResetPolicy() {
        return ;
    }
    
    
Specify true to reset the policy document to the default policy. The default policy allows access to the service.

Parameters:
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;
    }
    
    
Specify true to reset the policy document to the default policy. The default policy allows access to the service.

Returns a reference to this object so that method calls can be chained together.

Parameters:
resetPolicy Specify true to reset the policy document to the default policy. The default policy allows access to the service.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyVpcEndpointRequest withResetPolicy(Boolean resetPolicy) {
        this. = resetPolicy;
        return this;
    }

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

Returns:
Specify true to reset the policy document to the default policy. The default policy allows access to the service.
    public Boolean getResetPolicy() {
        return ;
    }

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

Returns:
A policy document to attach to the endpoint. The policy must be in valid JSON format.
    public String getPolicyDocument() {
        return ;
    }
    
    
A policy document to attach to the endpoint. The policy must be in valid JSON format.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
policyDocument A policy document to attach to the endpoint. The policy must be in valid JSON format.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyVpcEndpointRequest withPolicyDocument(String policyDocument) {
        this. = policyDocument;
        return this;
    }

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

Returns:
One or more route tables IDs to associate with the endpoint.
    public java.util.List<StringgetAddRouteTableIds() {
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
One or more route tables IDs to associate with the endpoint.

Parameters:
addRouteTableIds One or more route tables IDs to associate with the endpoint.
    public void setAddRouteTableIds(java.util.Collection<StringaddRouteTableIds) {
        if (addRouteTableIds == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringaddRouteTableIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(addRouteTableIds.size());
        addRouteTableIdsCopy.addAll(addRouteTableIds);
        this. = addRouteTableIdsCopy;
    }
    
    
One or more route tables IDs to associate with the endpoint.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
addRouteTableIds One or more route tables IDs to associate with the endpoint.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyVpcEndpointRequest withAddRouteTableIds(String... addRouteTableIds) {
        if (getAddRouteTableIds() == nullsetAddRouteTableIds(new java.util.ArrayList<String>(addRouteTableIds.length));
        for (String value : addRouteTableIds) {
            getAddRouteTableIds().add(value);
        }
        return this;
    }
    
    
One or more route tables IDs to associate with the endpoint.

Returns a reference to this object so that method calls can be chained together.

Parameters:
addRouteTableIds One or more route tables IDs to associate with the endpoint.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (addRouteTableIds == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringaddRouteTableIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(addRouteTableIds.size());
            addRouteTableIdsCopy.addAll(addRouteTableIds);
            this. = addRouteTableIdsCopy;
        }
        return this;
    }

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

Returns:
One or more route table IDs to disassociate from the endpoint.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
One or more route table IDs to disassociate from the endpoint.

Parameters:
removeRouteTableIds One or more route table IDs to disassociate from the endpoint.
    public void setRemoveRouteTableIds(java.util.Collection<StringremoveRouteTableIds) {
        if (removeRouteTableIds == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringremoveRouteTableIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(removeRouteTableIds.size());
        removeRouteTableIdsCopy.addAll(removeRouteTableIds);
        this. = removeRouteTableIdsCopy;
    }
    
    
One or more route table IDs to disassociate from the endpoint.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
removeRouteTableIds One or more route table IDs to disassociate from the endpoint.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyVpcEndpointRequest withRemoveRouteTableIds(String... removeRouteTableIds) {
        if (getRemoveRouteTableIds() == nullsetRemoveRouteTableIds(new java.util.ArrayList<String>(removeRouteTableIds.length));
        for (String value : removeRouteTableIds) {
            getRemoveRouteTableIds().add(value);
        }
        return this;
    }
    
    
One or more route table IDs to disassociate from the endpoint.

Returns a reference to this object so that method calls can be chained together.

Parameters:
removeRouteTableIds One or more route table IDs to disassociate from the endpoint.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (removeRouteTableIds == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringremoveRouteTableIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(removeRouteTableIds.size());
            removeRouteTableIdsCopy.addAll(removeRouteTableIds);
            this. = removeRouteTableIdsCopy;
        }
        return this;
    }

    
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
    @Override
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
    
    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getVpcEndpointId() != nullsb.append("VpcEndpointId: " + getVpcEndpointId() + ",");
        if (isResetPolicy() != nullsb.append("ResetPolicy: " + isResetPolicy() + ",");
        if (getPolicyDocument() != nullsb.append("PolicyDocument: " + getPolicyDocument() + ",");
        if (getAddRouteTableIds() != nullsb.append("AddRouteTableIds: " + getAddRouteTableIds() + ",");
        if (getRemoveRouteTableIds() != nullsb.append("RemoveRouteTableIds: " + getRemoveRouteTableIds() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getVpcEndpointId() == null) ? 0 : getVpcEndpointId().hashCode()); 
        hashCode = prime * hashCode + ((isResetPolicy() == null) ? 0 : isResetPolicy().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 boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ModifyVpcEndpointRequest == falsereturn false;
        ModifyVpcEndpointRequest other = (ModifyVpcEndpointRequest)obj;
        
        if (other.getVpcEndpointId() == null ^ this.getVpcEndpointId() == nullreturn false;
        if (other.getVpcEndpointId() != null && other.getVpcEndpointId().equals(this.getVpcEndpointId()) == falsereturn false
        if (other.isResetPolicy() == null ^ this.isResetPolicy() == nullreturn false;
        if (other.isResetPolicy() != null && other.isResetPolicy().equals(this.isResetPolicy()) == falsereturn false
        if (other.getPolicyDocument() == null ^ this.getPolicyDocument() == nullreturn false;
        if (other.getPolicyDocument() != null && other.getPolicyDocument().equals(this.getPolicyDocument()) == falsereturn false
        if (other.getAddRouteTableIds() == null ^ this.getAddRouteTableIds() == nullreturn false;
        if (other.getAddRouteTableIds() != null && other.getAddRouteTableIds().equals(this.getAddRouteTableIds()) == falsereturn false
        if (other.getRemoveRouteTableIds() == null ^ this.getRemoveRouteTableIds() == nullreturn false;
        if (other.getRemoveRouteTableIds() != null && other.getRemoveRouteTableIds().equals(this.getRemoveRouteTableIds()) == falsereturn false
        return true;
    }
    
    @Override
    public ModifyVpcEndpointRequest clone() {
        
            return (ModifyVpcEndpointRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X