public TransitGatewayRoute withType(TransitGatewayRouteType type) {
        this.type = type.toString();
        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