// Code generated by go-swagger; DO NOT EDIT.

// Copyright Authors of Cilium
// SPDX-License-Identifier: Apache-2.0

package bgp

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"net/http"

	"github.com/go-openapi/runtime"

	"github.com/cilium/cilium/api/v1/models"
)

// GetBgpRoutesOKCode is the HTTP code returned for type GetBgpRoutesOK
const GetBgpRoutesOKCode int = 200

/*
GetBgpRoutesOK Success

swagger:response getBgpRoutesOK
*/
type GetBgpRoutesOK struct {

	/*
	  In: Body
	*/
	Payload []*models.BgpRoute `json:"body,omitempty"`
}

// NewGetBgpRoutesOK creates GetBgpRoutesOK with default headers values
func NewGetBgpRoutesOK() *GetBgpRoutesOK {

	return &GetBgpRoutesOK{}
}

// WithPayload adds the payload to the get bgp routes o k response
func (o *GetBgpRoutesOK) WithPayload(payload []*models.BgpRoute) *GetBgpRoutesOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get bgp routes o k response
func (o *GetBgpRoutesOK) SetPayload(payload []*models.BgpRoute) {
	o.Payload = payload
}

// WriteResponse to the client
func (o *GetBgpRoutesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {

	rw.WriteHeader(200)
	payload := o.Payload
	if payload == nil {
		// return empty array
		payload = make([]*models.BgpRoute, 0, 50)
	}

	if err := producer.Produce(rw, payload); err != nil {
		panic(err) // let the recovery middleware deal with this
	}
}

// GetBgpRoutesInternalServerErrorCode is the HTTP code returned for type GetBgpRoutesInternalServerError
const GetBgpRoutesInternalServerErrorCode int = 500

/*
GetBgpRoutesInternalServerError Internal Server Error

swagger:response getBgpRoutesInternalServerError
*/
type GetBgpRoutesInternalServerError struct {

	/*
	  In: Body
	*/
	Payload models.Error `json:"body,omitempty"`
}

// NewGetBgpRoutesInternalServerError creates GetBgpRoutesInternalServerError with default headers values
func NewGetBgpRoutesInternalServerError() *GetBgpRoutesInternalServerError {

	return &GetBgpRoutesInternalServerError{}
}

// WithPayload adds the payload to the get bgp routes internal server error response
func (o *GetBgpRoutesInternalServerError) WithPayload(payload models.Error) *GetBgpRoutesInternalServerError {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get bgp routes internal server error response
func (o *GetBgpRoutesInternalServerError) SetPayload(payload models.Error) {
	o.Payload = payload
}

// WriteResponse to the client
func (o *GetBgpRoutesInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {

	rw.WriteHeader(500)
	payload := o.Payload
	if err := producer.Produce(rw, payload); err != nil {
		panic(err) // let the recovery middleware deal with this
	}
}

// GetBgpRoutesDisabledCode is the HTTP code returned for type GetBgpRoutesDisabled
const GetBgpRoutesDisabledCode int = 501

/*
GetBgpRoutesDisabled BGP Control Plane disabled

swagger:response getBgpRoutesDisabled
*/
type GetBgpRoutesDisabled struct {

	/*
	  In: Body
	*/
	Payload models.Error `json:"body,omitempty"`
}

// NewGetBgpRoutesDisabled creates GetBgpRoutesDisabled with default headers values
func NewGetBgpRoutesDisabled() *GetBgpRoutesDisabled {

	return &GetBgpRoutesDisabled{}
}

// WithPayload adds the payload to the get bgp routes disabled response
func (o *GetBgpRoutesDisabled) WithPayload(payload models.Error) *GetBgpRoutesDisabled {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get bgp routes disabled response
func (o *GetBgpRoutesDisabled) SetPayload(payload models.Error) {
	o.Payload = payload
}

// WriteResponse to the client
func (o *GetBgpRoutesDisabled) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {

	rw.WriteHeader(501)
	payload := o.Payload
	if err := producer.Produce(rw, payload); err != nil {
		panic(err) // let the recovery middleware deal with this
	}
}
