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

package bulk_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"
)

// ListBillRunsByOrganizationOKCode is the HTTP code returned for type ListBillRunsByOrganizationOK
const ListBillRunsByOrganizationOKCode int = 200

/*ListBillRunsByOrganizationOK Description of a successfully operation

swagger:response listBillRunsByOrganizationOK
*/
type ListBillRunsByOrganizationOK struct {

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

// NewListBillRunsByOrganizationOK creates ListBillRunsByOrganizationOK with default headers values
func NewListBillRunsByOrganizationOK() *ListBillRunsByOrganizationOK {

	return &ListBillRunsByOrganizationOK{}
}

// WithPayload adds the payload to the list bill runs by organization o k response
func (o *ListBillRunsByOrganizationOK) WithPayload(payload []*models.BillRunList) *ListBillRunsByOrganizationOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the list bill runs by organization o k response
func (o *ListBillRunsByOrganizationOK) SetPayload(payload []*models.BillRunList) {
	o.Payload = payload
}

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

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

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

// ListBillRunsByOrganizationInternalServerErrorCode is the HTTP code returned for type ListBillRunsByOrganizationInternalServerError
const ListBillRunsByOrganizationInternalServerErrorCode int = 500

/*ListBillRunsByOrganizationInternalServerError Something unexpected happend, error raised

swagger:response listBillRunsByOrganizationInternalServerError
*/
type ListBillRunsByOrganizationInternalServerError struct {

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

// NewListBillRunsByOrganizationInternalServerError creates ListBillRunsByOrganizationInternalServerError with default headers values
func NewListBillRunsByOrganizationInternalServerError() *ListBillRunsByOrganizationInternalServerError {

	return &ListBillRunsByOrganizationInternalServerError{}
}

// WithPayload adds the payload to the list bill runs by organization internal server error response
func (o *ListBillRunsByOrganizationInternalServerError) WithPayload(payload *models.ErrorResponse) *ListBillRunsByOrganizationInternalServerError {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the list bill runs by organization internal server error response
func (o *ListBillRunsByOrganizationInternalServerError) SetPayload(payload *models.ErrorResponse) {
	o.Payload = payload
}

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