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

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

/**
 * 

* Describes a static route for a VPN connection. *

*/ public class VpnStaticRoute implements Serializable, Cloneable { /** *

* The CIDR block associated with the local subnet of the customer data * center. *

*/ private String destinationCidrBlock; /** *

* Indicates how the routes were provided. *

*/ private String source; /** *

* The current state of the static route. *

*/ private String state; /** *

* The CIDR block associated with the local subnet of the customer data * center. *

* * @param destinationCidrBlock * The CIDR block associated with the local subnet of the customer * data center. */ public void setDestinationCidrBlock(String destinationCidrBlock) { this.destinationCidrBlock = destinationCidrBlock; } /** *

* The CIDR block associated with the local subnet of the customer data * center. *

* * @return The CIDR block associated with the local subnet of the customer * data center. */ public String getDestinationCidrBlock() { return this.destinationCidrBlock; } /** *

* The CIDR block associated with the local subnet of the customer data * center. *

* * @param destinationCidrBlock * The CIDR block associated with the local subnet of the customer * data center. * @return Returns a reference to this object so that method calls can be * chained together. */ public VpnStaticRoute withDestinationCidrBlock(String destinationCidrBlock) { setDestinationCidrBlock(destinationCidrBlock); return this; } /** *

* Indicates how the routes were provided. *

* * @param source * Indicates how the routes were provided. * @see VpnStaticRouteSource */ public void setSource(String source) { this.source = source; } /** *

* Indicates how the routes were provided. *

* * @return Indicates how the routes were provided. * @see VpnStaticRouteSource */ public String getSource() { return this.source; } /** *

* Indicates how the routes were provided. *

* * @param source * Indicates how the routes were provided. * @return Returns a reference to this object so that method calls can be * chained together. * @see VpnStaticRouteSource */ public VpnStaticRoute withSource(String source) { setSource(source); return this; } /** *

* Indicates how the routes were provided. *

* * @param source * Indicates how the routes were provided. * @see VpnStaticRouteSource */ public void setSource(VpnStaticRouteSource source) { this.source = source.toString(); } /** *

* Indicates how the routes were provided. *

* * @param source * Indicates how the routes were provided. * @return Returns a reference to this object so that method calls can be * chained together. * @see VpnStaticRouteSource */ public VpnStaticRoute withSource(VpnStaticRouteSource source) { setSource(source); return this; } /** *

* The current state of the static route. *

* * @param state * The current state of the static route. * @see VpnState */ public void setState(String state) { this.state = state; } /** *

* The current state of the static route. *

* * @return The current state of the static route. * @see VpnState */ public String getState() { return this.state; } /** *

* The current state of the static route. *

* * @param state * The current state of the static route. * @return Returns a reference to this object so that method calls can be * chained together. * @see VpnState */ public VpnStaticRoute withState(String state) { setState(state); return this; } /** *

* The current state of the static route. *

* * @param state * The current state of the static route. * @see VpnState */ public void setState(VpnState state) { this.state = state.toString(); } /** *

* The current state of the static route. *

* * @param state * The current state of the static route. * @return Returns a reference to this object so that method calls can be * chained together. * @see VpnState */ public VpnStaticRoute withState(VpnState state) { setState(state); return this; } /** * 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 (getDestinationCidrBlock() != null) sb.append("DestinationCidrBlock: " + getDestinationCidrBlock() + ","); if (getSource() != null) sb.append("Source: " + getSource() + ","); if (getState() != null) sb.append("State: " + getState()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof VpnStaticRoute == false) return false; VpnStaticRoute other = (VpnStaticRoute) obj; if (other.getDestinationCidrBlock() == null ^ this.getDestinationCidrBlock() == null) return false; if (other.getDestinationCidrBlock() != null && other.getDestinationCidrBlock().equals( this.getDestinationCidrBlock()) == false) return false; if (other.getSource() == null ^ this.getSource() == null) return false; if (other.getSource() != null && other.getSource().equals(this.getSource()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDestinationCidrBlock() == null) ? 0 : getDestinationCidrBlock().hashCode()); hashCode = prime * hashCode + ((getSource() == null) ? 0 : getSource().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); return hashCode; } @Override public VpnStaticRoute clone() { try { return (VpnStaticRoute) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy