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

package invoice_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/billing/models"
)

// ListResellerInvoicesOKCode is the HTTP code returned for type ListResellerInvoicesOK
const ListResellerInvoicesOKCode int = 200

/*ListResellerInvoicesOK Description of a successfully operation

swagger:response listResellerInvoicesOK
*/
type ListResellerInvoicesOK struct {

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

// NewListResellerInvoicesOK creates ListResellerInvoicesOK with default headers values
func NewListResellerInvoicesOK() *ListResellerInvoicesOK {

	return &ListResellerInvoicesOK{}
}

// WithPayload adds the payload to the list reseller invoices o k response
func (o *ListResellerInvoicesOK) WithPayload(payload []*models.Invoice) *ListResellerInvoicesOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the list reseller invoices o k response
func (o *ListResellerInvoicesOK) SetPayload(payload []*models.Invoice) {
	o.Payload = payload
}

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

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

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

// ListResellerInvoicesInternalServerErrorCode is the HTTP code returned for type ListResellerInvoicesInternalServerError
const ListResellerInvoicesInternalServerErrorCode int = 500

/*ListResellerInvoicesInternalServerError Something unexpected happend, error raised

swagger:response listResellerInvoicesInternalServerError
*/
type ListResellerInvoicesInternalServerError struct {

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

// NewListResellerInvoicesInternalServerError creates ListResellerInvoicesInternalServerError with default headers values
func NewListResellerInvoicesInternalServerError() *ListResellerInvoicesInternalServerError {

	return &ListResellerInvoicesInternalServerError{}
}

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

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

// WriteResponse to the client
func (o *ListResellerInvoicesInternalServerError) 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
		}
	}
}
