public TransitGatewayRoute withType(String type) {
        setType(type);
        return this;
    }
<p>
The route type.
</p>

@param type
       The route type.
@return Returns a reference to this object so that method calls can be chained together.
@see TransitGatewayRouteType
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/TransitGatewayRoute.java