func (o *GetTCPResponseRulesOKBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}
MarshalBinary interface implementation
package tcp_response_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 GetTCPResponseRulesHandlerFunc func(GetTCPResponseRulesParams, interface{}) middleware.Responder
func (fn GetTCPResponseRulesHandlerFunc) Handle(params GetTCPResponseRulesParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
type GetTCPResponseRulesHandler interface {
	Handle(GetTCPResponseRulesParams, interface{}) middleware.Responder
}
func NewGetTCPResponseRules(ctx *middleware.Context, handler GetTCPResponseRulesHandler) *GetTCPResponseRules {
	return &GetTCPResponseRules{Context: ctx, Handler: handler}
}
type GetTCPResponseRules struct {
	Context *middleware.Context
	Handler GetTCPResponseRulesHandler
}
func (o *GetTCPResponseRules) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
	route, rCtx, _ := o.Context.RouteInfo(r)
	if rCtx != nil {
		r = rCtx
	}
	var Params = NewGetTCPResponseRulesParams()
	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 GetTCPResponseRulesOKBody struct {
	Version int64 `json:"_version,omitempty"`
	Data models.TCPResponseRules `json:"data"`
}
func (o *GetTCPResponseRulesOKBody) 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
}
func (o *GetTCPResponseRulesOKBody) validateData(formats strfmt.Registry) error {
	if err := validate.Required("getTcpResponseRulesOK"+"."+"data", "body", o.Data); err != nil {
		return err
	}
	if err := o.Data.Validate(formats); err != nil {
		if ve, ok := err.(*errors.Validation); ok {
			return ve.ValidateName("getTcpResponseRulesOK" + "." + "data")
		}
		return err
	}
	return nil
}