public void setTransitGatewayAttachments(java.util.Collection<TransitGatewayRouteAttachment> transitGatewayAttachments) {
        if (transitGatewayAttachments == null) {
            this.transitGatewayAttachments = null;
            return;
        }

        this.transitGatewayAttachments = new com.amazonaws.internal.SdkInternalList<TransitGatewayRouteAttachment>(transitGatewayAttachments);
    }
<p>
The attachments.
</p>

@param transitGatewayAttachments
       The attachments.
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/TransitGatewayRoute.java