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
}
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")
	
	if err := r.SetQueryParam("states", joinedStates...); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
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 , " " ) // query array param states if err := r . SetQueryParam ( " " , joinedStates ... ) ; err != nil { return err } if len ( res ) > 0 { return errors . CompositeValidationError ( res ... ) } return nil }
// WriteToRequest writes these params to a swagger request
WriteToRequest writes these params to a swagger request