code: func (o *FindVmsByStatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
  
  	if err := r.SetTimeout(o.timeout); err != nil {
  		return err
  	}
  	var res []error
  
  	valuesStates := o.States
  
  	joinedStates := swag.JoinByFormat(valuesStates, "multi")
  	// query array param states
  	if err := r.SetQueryParam("states", joinedStates...); err != nil {
  		return err
  	}
  
  	if len(res) > 0 {
  		return errors.CompositeValidationError(res...)
  	}
  	return nil
  }
docs: // WriteToRequest writes these params to a swagger request