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

// ListCustomerInvoicesOKCode is the HTTP code returned for type ListCustomerInvoicesOK
const ListCustomerInvoicesOKCode int = 200

/*ListCustomerInvoicesOK Description of a successfully operation

swagger:response listCustomerInvoicesOK
*/
type ListCustomerInvoicesOK struct {

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

// NewListCustomerInvoicesOK creates ListCustomerInvoicesOK with default headers values
func NewListCustomerInvoicesOK() *ListCustomerInvoicesOK {

	return &ListCustomerInvoicesOK{}
}

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

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

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

// ListCustomerInvoicesInternalServerErrorCode is the HTTP code returned for type ListCustomerInvoicesInternalServerError
const ListCustomerInvoicesInternalServerErrorCode int = 500

/*ListCustomerInvoicesInternalServerError Something unexpected happend, error raised

swagger:response listCustomerInvoicesInternalServerError
*/
type ListCustomerInvoicesInternalServerError struct {

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

// NewListCustomerInvoicesInternalServerError creates ListCustomerInvoicesInternalServerError with default headers values
func NewListCustomerInvoicesInternalServerError() *ListCustomerInvoicesInternalServerError {

	return &ListCustomerInvoicesInternalServerError{}
}

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

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

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