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

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

package policy

// 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"
)

// GetPolicySelectorsOKCode is the HTTP code returned for type GetPolicySelectorsOK
const GetPolicySelectorsOKCode int = 200

/*
GetPolicySelectorsOK Success

swagger:response getPolicySelectorsOK
*/
type GetPolicySelectorsOK struct {

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

// NewGetPolicySelectorsOK creates GetPolicySelectorsOK with default headers values
func NewGetPolicySelectorsOK() *GetPolicySelectorsOK {

	return &GetPolicySelectorsOK{}
}

// WithPayload adds the payload to the get policy selectors o k response
func (o *GetPolicySelectorsOK) WithPayload(payload models.SelectorCache) *GetPolicySelectorsOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get policy selectors o k response
func (o *GetPolicySelectorsOK) SetPayload(payload models.SelectorCache) {
	o.Payload = payload
}

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

	rw.WriteHeader(200)
	payload := o.Payload
	if payload == nil {
		// return empty array
		payload = models.SelectorCache{}
	}

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