code: func (o *ListTasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
  
  	if err := r.SetTimeout(o.timeout); err != nil {
  		return err
  	}
  	var res []error
  
  	if o.PageSize != nil {
  
  		// query param pageSize
  		var qrPageSize int32
  		if o.PageSize != nil {
  			qrPageSize = *o.PageSize
  		}
  		qPageSize := swag.FormatInt32(qrPageSize)
  		if qPageSize != "" {
  			if err := r.SetQueryParam("pageSize", qPageSize); err != nil {
  				return err
  			}
  		}
  
  	}
  
  	if o.SinceID != nil {
  
  		// query param sinceId
  		var qrSinceID int64
  		if o.SinceID != nil {
  			qrSinceID = *o.SinceID
  		}
  		qSinceID := swag.FormatInt64(qrSinceID)
  		if qSinceID != "" {
  			if err := r.SetQueryParam("sinceId", qSinceID); err != nil {
  				return err
  			}
  		}
  
  	}
  
  	valuesStatus := o.Status
  
  	joinedStatus := swag.JoinByFormat(valuesStatus, "pipes")
  	// query array param status
  	if err := r.SetQueryParam("status", joinedStatus...); err != nil {
  		return err
  	}
  
  	valuesTags := o.Tags
  
  	joinedTags := swag.JoinByFormat(valuesTags, "")
  	// query array param tags
  	if err := r.SetQueryParam("tags", joinedTags...); err != nil {
  		return err
  	}
  
  	if len(res) > 0 {
  		return errors.CompositeValidationError(res...)
  	}
  	return nil
  }
docs: // WriteToRequest writes these params to a swagger request