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

package sku_management

// 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/Cyclops-Labs/cyclops-4-hpc.git/services/plan-manager/models"
)

// ListSkusOKCode is the HTTP code returned for type ListSkusOK
const ListSkusOKCode int = 200

/*ListSkusOK list of skus returned

swagger:response listSkusOK
*/
type ListSkusOK struct {

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

// NewListSkusOK creates ListSkusOK with default headers values
func NewListSkusOK() *ListSkusOK {

	return &ListSkusOK{}
}

// WithPayload adds the payload to the list skus o k response
func (o *ListSkusOK) WithPayload(payload []*models.Sku) *ListSkusOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the list skus o k response
func (o *ListSkusOK) SetPayload(payload []*models.Sku) {
	o.Payload = payload
}

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

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

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

// ListSkusInternalServerErrorCode is the HTTP code returned for type ListSkusInternalServerError
const ListSkusInternalServerErrorCode int = 500

/*ListSkusInternalServerError unexpected error

swagger:response listSkusInternalServerError
*/
type ListSkusInternalServerError struct {

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

// NewListSkusInternalServerError creates ListSkusInternalServerError with default headers values
func NewListSkusInternalServerError() *ListSkusInternalServerError {

	return &ListSkusInternalServerError{}
}

// WithPayload adds the payload to the list skus internal server error response
func (o *ListSkusInternalServerError) WithPayload(payload *models.ErrorResponse) *ListSkusInternalServerError {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the list skus internal server error response
func (o *ListSkusInternalServerError) SetPayload(payload *models.ErrorResponse) {
	o.Payload = payload
}

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

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