func (o *CreateNameserverParams) bindResolver(rawData []string, hasKey bool, formats strfmt.Registry) error {
	if !hasKey {
		return errors.Required("resolver", "query")
	}
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}
	if err := validate.RequiredString("resolver", "query", raw); err != nil {
		return err
	}
	o.Resolver = raw
	return nil
}
bindResolver binds and validates parameter Resolver from query.
package nameserver
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 NewCreateNameserverParams() CreateNameserverParams {
	var (
		forceReloadDefault = bool(false)
	)
	return CreateNameserverParams{
		ForceReload: &forceReloadDefault,
	}
}
type CreateNameserverParams struct {
	HTTPRequest *http.Request `json:"-"`
	Data *models.Nameserver
	ForceReload *bool
	Resolver string
	TransactionID *string
	Version *int64
}
func (o *CreateNameserverParams) 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.Nameserver
		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)
	}
	qResolver, qhkResolver, _ := qs.GetOK("resolver")
	if err := o.bindResolver(qResolver, qhkResolver, 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
}
func (o *CreateNameserverParams) bindForceReload(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}
	if raw == "" {  
		return nil
	}
	value, err := swag.ConvertBool(raw)
	if err != nil {
		return errors.InvalidType("force_reload", "query", "bool", raw)
	}
	o.ForceReload = &value
	return nil
}