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

// GetInvoicesByCustomerOKCode is the HTTP code returned for type GetInvoicesByCustomerOK
const GetInvoicesByCustomerOKCode int = 200

/*GetInvoicesByCustomerOK Description of a successfully operation

swagger:response getInvoicesByCustomerOK
*/
type GetInvoicesByCustomerOK struct {

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

// NewGetInvoicesByCustomerOK creates GetInvoicesByCustomerOK with default headers values
func NewGetInvoicesByCustomerOK() *GetInvoicesByCustomerOK {

	return &GetInvoicesByCustomerOK{}
}

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

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

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

// GetInvoicesByCustomerNotFoundCode is the HTTP code returned for type GetInvoicesByCustomerNotFound
const GetInvoicesByCustomerNotFoundCode int = 404

/*GetInvoicesByCustomerNotFound The invoice id provided doesn't exist

swagger:response getInvoicesByCustomerNotFound
*/
type GetInvoicesByCustomerNotFound struct {

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

// NewGetInvoicesByCustomerNotFound creates GetInvoicesByCustomerNotFound with default headers values
func NewGetInvoicesByCustomerNotFound() *GetInvoicesByCustomerNotFound {

	return &GetInvoicesByCustomerNotFound{}
}

// WithPayload adds the payload to the get invoices by customer not found response
func (o *GetInvoicesByCustomerNotFound) WithPayload(payload *models.ErrorResponse) *GetInvoicesByCustomerNotFound {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get invoices by customer not found response
func (o *GetInvoicesByCustomerNotFound) SetPayload(payload *models.ErrorResponse) {
	o.Payload = payload
}

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

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

// GetInvoicesByCustomerInternalServerErrorCode is the HTTP code returned for type GetInvoicesByCustomerInternalServerError
const GetInvoicesByCustomerInternalServerErrorCode int = 500

/*GetInvoicesByCustomerInternalServerError Something unexpected happend, error raised

swagger:response getInvoicesByCustomerInternalServerError
*/
type GetInvoicesByCustomerInternalServerError struct {

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

// NewGetInvoicesByCustomerInternalServerError creates GetInvoicesByCustomerInternalServerError with default headers values
func NewGetInvoicesByCustomerInternalServerError() *GetInvoicesByCustomerInternalServerError {

	return &GetInvoicesByCustomerInternalServerError{}
}

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

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

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