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

// GetInvoicesByResellerOKCode is the HTTP code returned for type GetInvoicesByResellerOK
const GetInvoicesByResellerOKCode int = 200

/*GetInvoicesByResellerOK Description of a successfully operation

swagger:response getInvoicesByResellerOK
*/
type GetInvoicesByResellerOK struct {

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

// NewGetInvoicesByResellerOK creates GetInvoicesByResellerOK with default headers values
func NewGetInvoicesByResellerOK() *GetInvoicesByResellerOK {

	return &GetInvoicesByResellerOK{}
}

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

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

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

// GetInvoicesByResellerNotFoundCode is the HTTP code returned for type GetInvoicesByResellerNotFound
const GetInvoicesByResellerNotFoundCode int = 404

/*GetInvoicesByResellerNotFound The invoice id provided doesn't exist

swagger:response getInvoicesByResellerNotFound
*/
type GetInvoicesByResellerNotFound struct {

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

// NewGetInvoicesByResellerNotFound creates GetInvoicesByResellerNotFound with default headers values
func NewGetInvoicesByResellerNotFound() *GetInvoicesByResellerNotFound {

	return &GetInvoicesByResellerNotFound{}
}

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

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

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

// GetInvoicesByResellerInternalServerErrorCode is the HTTP code returned for type GetInvoicesByResellerInternalServerError
const GetInvoicesByResellerInternalServerErrorCode int = 500

/*GetInvoicesByResellerInternalServerError Something unexpected happend, error raised

swagger:response getInvoicesByResellerInternalServerError
*/
type GetInvoicesByResellerInternalServerError struct {

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

// NewGetInvoicesByResellerInternalServerError creates GetInvoicesByResellerInternalServerError with default headers values
func NewGetInvoicesByResellerInternalServerError() *GetInvoicesByResellerInternalServerError {

	return &GetInvoicesByResellerInternalServerError{}
}

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

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

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