func (o *CreateFilterParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
	var res []error
	o.HTTPRequest = r
	qs := runtime.Values(r.URL.Query())
	if runtime.HasBody(r) {
		defer r.Body.Close()
		var body models.Filter
		if err := route.Consumer.Consume(r.Body, &body); err != nil {
			if err == io.EOF {
				res = append(res, errors.Required("data", "body"))
			} else {
				res = append(res, errors.NewParseError("data", "body", "", err))
			}
		} else {
			if err := body.Validate(route.Formats); err != nil {
				res = append(res, err)
			}
			if len(res) == 0 {
				o.Data = &body
			}
		}
	} else {
		res = append(res, errors.Required("data", "body"))
	}
	qForceReload, qhkForceReload, _ := qs.GetOK("force_reload")
	if err := o.bindForceReload(qForceReload, qhkForceReload, route.Formats); err != nil {
		res = append(res, err)
	}
	qParentName, qhkParentName, _ := qs.GetOK("parent_name")
	if err := o.bindParentName(qParentName, qhkParentName, route.Formats); err != nil {
		res = append(res, err)
	}
	qParentType, qhkParentType, _ := qs.GetOK("parent_type")
	if err := o.bindParentType(qParentType, qhkParentType, route.Formats); err != nil {
		res = append(res, err)
	}
	qTransactionID, qhkTransactionID, _ := qs.GetOK("transaction_id")
	if err := o.bindTransactionID(qTransactionID, qhkTransactionID, route.Formats); err != nil {
		res = append(res, err)
	}
	qVersion, qhkVersion, _ := qs.GetOK("version")
	if err := o.bindVersion(qVersion, qhkVersion, route.Formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewCreateFilterParams() beforehand.
package filter
import (
	"io"
	"net/http"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/runtime/middleware"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
	"github.com/haproxytech/client-native/v2/models"
)
func NewCreateFilterParams() CreateFilterParams {
	var (
		forceReloadDefault = bool(false)
	)
	return CreateFilterParams{
		ForceReload: &forceReloadDefault,
	}
}
type CreateFilterParams struct {
	HTTPRequest *http.Request `json:"-"`
	Data *models.Filter
	ForceReload *bool
	ParentName string
	ParentType string
	TransactionID *string
	Version *int64
}