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

package operations

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

	models "github.com/bloomberg/goldpinger/pkg/models"
)

// HealthzOKCode is the HTTP code returned for type HealthzOK
const HealthzOKCode int = 200

/*HealthzOK Health check report

swagger:response healthzOK
*/
type HealthzOK struct {

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

// NewHealthzOK creates HealthzOK with default headers values
func NewHealthzOK() *HealthzOK {

	return &HealthzOK{}
}

// WithPayload adds the payload to the healthz o k response
func (o *HealthzOK) WithPayload(payload *models.HealthCheckResults) *HealthzOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the healthz o k response
func (o *HealthzOK) SetPayload(payload *models.HealthCheckResults) {
	o.Payload = payload
}

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

// HealthzServiceUnavailableCode is the HTTP code returned for type HealthzServiceUnavailable
const HealthzServiceUnavailableCode int = 503

/*HealthzServiceUnavailable Unhealthy service

swagger:response healthzServiceUnavailable
*/
type HealthzServiceUnavailable struct {

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

// NewHealthzServiceUnavailable creates HealthzServiceUnavailable with default headers values
func NewHealthzServiceUnavailable() *HealthzServiceUnavailable {

	return &HealthzServiceUnavailable{}
}

// WithPayload adds the payload to the healthz service unavailable response
func (o *HealthzServiceUnavailable) WithPayload(payload *models.HealthCheckResults) *HealthzServiceUnavailable {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the healthz service unavailable response
func (o *HealthzServiceUnavailable) SetPayload(payload *models.HealthCheckResults) {
	o.Payload = payload
}

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

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