code: public TransitGatewayRoute withTransitGatewayAttachments(TransitGatewayRouteAttachment... transitGatewayAttachments) {
          if (this.transitGatewayAttachments == null) {
              setTransitGatewayAttachments(new com.amazonaws.internal.SdkInternalList<TransitGatewayRouteAttachment>(transitGatewayAttachments.length));
          }
          for (TransitGatewayRouteAttachment ele : transitGatewayAttachments) {
              this.transitGatewayAttachments.add(ele);
          }
          return this;
      }
docs: <p>
  The attachments.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setTransitGatewayAttachments(java.util.Collection)} or
  {@link #withTransitGatewayAttachments(java.util.Collection)} if you want to override the existing values.
  </p>
  
  @param transitGatewayAttachments
  The attachments.
  @return Returns a reference to this object so that method calls can be chained together.