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

package health

// 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/checkr/openmock/swagger_gen/models"
)

// GetHealthOKCode is the HTTP code returned for type GetHealthOK
const GetHealthOKCode int = 200

/*GetHealthOK status of health check

swagger:response getHealthOK
*/
type GetHealthOK struct {

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

// NewGetHealthOK creates GetHealthOK with default headers values
func NewGetHealthOK() *GetHealthOK {

	return &GetHealthOK{}
}

// WithPayload adds the payload to the get health o k response
func (o *GetHealthOK) WithPayload(payload *models.Health) *GetHealthOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get health o k response
func (o *GetHealthOK) SetPayload(payload *models.Health) {
	o.Payload = payload
}

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

/*GetHealthDefault generic error response

swagger:response getHealthDefault
*/
type GetHealthDefault struct {
	_statusCode int

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

// NewGetHealthDefault creates GetHealthDefault with default headers values
func NewGetHealthDefault(code int) *GetHealthDefault {
	if code <= 0 {
		code = 500
	}

	return &GetHealthDefault{
		_statusCode: code,
	}
}

// WithStatusCode adds the status to the get health default response
func (o *GetHealthDefault) WithStatusCode(code int) *GetHealthDefault {
	o._statusCode = code
	return o
}

// SetStatusCode sets the status to the get health default response
func (o *GetHealthDefault) SetStatusCode(code int) {
	o._statusCode = code
}

// WithPayload adds the payload to the get health default response
func (o *GetHealthDefault) WithPayload(payload *models.Error) *GetHealthDefault {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get health default response
func (o *GetHealthDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}

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

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