public PutInstancePublicPortsRequest withPortInfos(PortInfo... portInfos) {
        if (this.portInfos == null) {
            setPortInfos(new java.util.ArrayList<PortInfo>(portInfos.length));
        }
        for (PortInfo ele : portInfos) {
            this.portInfos.add(ele);
        }
        return this;
    }
public PutInstancePublicPortsRequest withPortInfos ( PortInfo ... portInfos ) { if ( this . portInfos == null ) { setPortInfos ( new java . util . ArrayList < PortInfo > ( portInfos . length ) ) ; } for ( PortInfo ele : portInfos ) { this . portInfos . add ( ele ) ; } return this ; }
<p>
Specifies information about the public port(s).
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setPortInfos(java.util.Collection)} or {@link #withPortInfos(java.util.Collection)} if you want to
override the existing values.
</p>

@param portInfos
Specifies information about the public port(s).
@return Returns a reference to this object so that method calls can be chained together.