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

package credit_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/credit-system/models"
)

// DecreaseCreditOKCode is the HTTP code returned for type DecreaseCreditOK
const DecreaseCreditOKCode int = 200

/*DecreaseCreditOK Credit status of the account with the provided id

swagger:response decreaseCreditOK
*/
type DecreaseCreditOK struct {

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

// NewDecreaseCreditOK creates DecreaseCreditOK with default headers values
func NewDecreaseCreditOK() *DecreaseCreditOK {

	return &DecreaseCreditOK{}
}

// WithPayload adds the payload to the decrease credit o k response
func (o *DecreaseCreditOK) WithPayload(payload *models.CreditStatus) *DecreaseCreditOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the decrease credit o k response
func (o *DecreaseCreditOK) SetPayload(payload *models.CreditStatus) {
	o.Payload = payload
}

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

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

// DecreaseCreditNotFoundCode is the HTTP code returned for type DecreaseCreditNotFound
const DecreaseCreditNotFoundCode int = 404

/*DecreaseCreditNotFound The account with the id provided doesn't exist

swagger:response decreaseCreditNotFound
*/
type DecreaseCreditNotFound struct {

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

// NewDecreaseCreditNotFound creates DecreaseCreditNotFound with default headers values
func NewDecreaseCreditNotFound() *DecreaseCreditNotFound {

	return &DecreaseCreditNotFound{}
}

// WithPayload adds the payload to the decrease credit not found response
func (o *DecreaseCreditNotFound) WithPayload(payload *models.ErrorResponse) *DecreaseCreditNotFound {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the decrease credit not found response
func (o *DecreaseCreditNotFound) SetPayload(payload *models.ErrorResponse) {
	o.Payload = payload
}

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

// DecreaseCreditInternalServerErrorCode is the HTTP code returned for type DecreaseCreditInternalServerError
const DecreaseCreditInternalServerErrorCode int = 500

/*DecreaseCreditInternalServerError Something unexpected happend, error raised

swagger:response decreaseCreditInternalServerError
*/
type DecreaseCreditInternalServerError struct {

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

// NewDecreaseCreditInternalServerError creates DecreaseCreditInternalServerError with default headers values
func NewDecreaseCreditInternalServerError() *DecreaseCreditInternalServerError {

	return &DecreaseCreditInternalServerError{}
}

// WithPayload adds the payload to the decrease credit internal server error response
func (o *DecreaseCreditInternalServerError) WithPayload(payload *models.ErrorResponse) *DecreaseCreditInternalServerError {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the decrease credit internal server error response
func (o *DecreaseCreditInternalServerError) SetPayload(payload *models.ErrorResponse) {
	o.Payload = payload
}

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