func (o *GetServerSwitchingRulesOKBody) Validate(formats strfmt.Registry) error {
	var res []error
	if err := o.validateData(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
Validate validates this get server switching rules o k body
package server_switching_rule
import (
	"net/http"
	"github.com/go-openapi/errors"
	"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"
)
type GetServerSwitchingRulesHandlerFunc func(GetServerSwitchingRulesParams, interface{}) middleware.Responder
func (fn GetServerSwitchingRulesHandlerFunc) Handle(params GetServerSwitchingRulesParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
type GetServerSwitchingRulesHandler interface {
	Handle(GetServerSwitchingRulesParams, interface{}) middleware.Responder
}
func NewGetServerSwitchingRules(ctx *middleware.Context, handler GetServerSwitchingRulesHandler) *GetServerSwitchingRules {
	return &GetServerSwitchingRules{Context: ctx, Handler: handler}
}
type GetServerSwitchingRules struct {
	Context *middleware.Context
	Handler GetServerSwitchingRulesHandler
}
func (o *GetServerSwitchingRules) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
	route, rCtx, _ := o.Context.RouteInfo(r)
	if rCtx != nil {
		r = rCtx
	}
	var Params = NewGetServerSwitchingRulesParams()
	uprinc, aCtx, err := o.Context.Authorize(r, route)
	if err != nil {
		o.Context.Respond(rw, r, route.Produces, route, err)
		return
	}
	if aCtx != nil {
		r = aCtx
	}
	var principal interface{}
	if uprinc != nil {
		principal = uprinc
	}
	if err := o.Context.BindValidRequest(r, route, &Params); err != nil {  
		o.Context.Respond(rw, r, route.Produces, route, err)
		return
	}
	res := o.Handler.Handle(Params, principal)  
	o.Context.Respond(rw, r, route.Produces, route, res)
}
type GetServerSwitchingRulesOKBody struct {
	Version int64 `json:"_version,omitempty"`
	Data models.ServerSwitchingRules `json:"data"`
}