func (h *DeletePeerEntryHandlerImpl) Handle(params peer_entry.DeletePeerEntryParams, principal interface{}) middleware.Responder {
	t := ""
	v := int64(0)
	if params.TransactionID != nil {
		t = *params.TransactionID
	}
	if params.Version != nil {
		v = *params.Version
	}
	if t != "" && *params.ForceReload {
		msg := "Both force_reload and transaction specified, specify only one"
		c := misc.ErrHTTPBadRequest
		e := &models.Error{
			Message: &msg,
			Code:    &c,
		}
		return peer_entry.NewDeletePeerEntryDefault(int(*e.Code)).WithPayload(e)
	}
	err := h.Client.Configuration.DeletePeerEntry(params.Name, params.PeerSection, t, v)
	if err != nil {
		e := misc.HandleError(err)
		return peer_entry.NewDeletePeerEntryDefault(int(*e.Code)).WithPayload(e)
	}
	if params.TransactionID == nil {
		if *params.ForceReload {
			err := h.ReloadAgent.ForceReload()
			if err != nil {
				e := misc.HandleError(err)
				return peer_entry.NewDeletePeerEntryDefault(int(*e.Code)).WithPayload(e)
			}
			return peer_entry.NewDeletePeerEntryNoContent()
		}
		rID := h.ReloadAgent.Reload()
		return peer_entry.NewDeletePeerEntryAccepted().WithReloadID(rID)
	}
	return peer_entry.NewDeletePeerEntryAccepted()
}
Handle executing the request and returning a response
package handlers
import (
	"github.com/go-openapi/runtime/middleware"
	client_native "github.com/haproxytech/client-native/v2"
	"github.com/haproxytech/client-native/v2/models"
	"github.com/haproxytech/dataplaneapi/haproxy"
	"github.com/haproxytech/dataplaneapi/misc"
	"github.com/haproxytech/dataplaneapi/operations/peer_entry"
)
type CreatePeerEntryHandlerImpl struct {
	Client      *client_native.HAProxyClient
	ReloadAgent haproxy.IReloadAgent
}
type DeletePeerEntryHandlerImpl struct {
	Client      *client_native.HAProxyClient
	ReloadAgent haproxy.IReloadAgent
}
type GetPeerEntryHandlerImpl struct {
	Client *client_native.HAProxyClient
}
type GetPeerEntriesHandlerImpl struct {
	Client *client_native.HAProxyClient
}
type ReplacePeerEntryHandlerImpl struct {
	Client      *client_native.HAProxyClient
	ReloadAgent haproxy.IReloadAgent
}
func (h *CreatePeerEntryHandlerImpl) Handle(params peer_entry.CreatePeerEntryParams, principal interface{}) middleware.Responder {
	t := ""
	v := int64(0)
	if params.TransactionID != nil {
		t = *params.TransactionID
	}
	if params.Version != nil {
		v = *params.Version
	}
	if t != "" && *params.ForceReload {
		msg := "Both force_reload and transaction specified, specify only one"
		c := misc.ErrHTTPBadRequest
		e := &models.Error{
			Message: &msg,
			Code:    &c,
		}
		return peer_entry.NewCreatePeerEntryDefault(int(*e.Code)).WithPayload(e)
	}
	err := h.Client.Configuration.CreatePeerEntry(params.PeerSection, params.Data, t, v)
	if err != nil {
		e := misc.HandleError(err)
		return peer_entry.NewCreatePeerEntryDefault(int(*e.Code)).WithPayload(e)
	}
	if params.TransactionID == nil {
		if *params.ForceReload {
			err := h.ReloadAgent.ForceReload()
			if err != nil {
				e := misc.HandleError(err)
				return peer_entry.NewCreatePeerEntryDefault(int(*e.Code)).WithPayload(e)
			}
			return peer_entry.NewCreatePeerEntryCreated().WithPayload(params.Data)
		}
		rID := h.ReloadAgent.Reload()
		return peer_entry.NewCreatePeerEntryAccepted().WithReloadID(rID).WithPayload(params.Data)
	}
	return peer_entry.NewCreatePeerEntryAccepted().WithPayload(params.Data)
}