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

package template_set

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

// PostTemplateSetOKCode is the HTTP code returned for type PostTemplateSetOK
const PostTemplateSetOKCode int = 200

/*PostTemplateSetOK returns the successfully posted templates

swagger:response postTemplateSetOK
*/
type PostTemplateSetOK struct {

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

// NewPostTemplateSetOK creates PostTemplateSetOK with default headers values
func NewPostTemplateSetOK() *PostTemplateSetOK {

	return &PostTemplateSetOK{}
}

// WithPayload adds the payload to the post template set o k response
func (o *PostTemplateSetOK) WithPayload(payload models.Mocks) *PostTemplateSetOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the post template set o k response
func (o *PostTemplateSetOK) SetPayload(payload models.Mocks) {
	o.Payload = payload
}

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

	rw.WriteHeader(200)
	payload := o.Payload
	if payload == nil {
		// return empty array
		payload = models.Mocks{}
	}

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

// PostTemplateSetBadRequestCode is the HTTP code returned for type PostTemplateSetBadRequest
const PostTemplateSetBadRequestCode int = 400

/*PostTemplateSetBadRequest if incoming templates were invalid

swagger:response postTemplateSetBadRequest
*/
type PostTemplateSetBadRequest struct {

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

// NewPostTemplateSetBadRequest creates PostTemplateSetBadRequest with default headers values
func NewPostTemplateSetBadRequest() *PostTemplateSetBadRequest {

	return &PostTemplateSetBadRequest{}
}

// WithPayload adds the payload to the post template set bad request response
func (o *PostTemplateSetBadRequest) WithPayload(payload *models.Error) *PostTemplateSetBadRequest {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the post template set bad request response
func (o *PostTemplateSetBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}

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

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

/*PostTemplateSetDefault generic error response

swagger:response postTemplateSetDefault
*/
type PostTemplateSetDefault struct {
	_statusCode int

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

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

	return &PostTemplateSetDefault{
		_statusCode: code,
	}
}

// WithStatusCode adds the status to the post template set default response
func (o *PostTemplateSetDefault) WithStatusCode(code int) *PostTemplateSetDefault {
	o._statusCode = code
	return o
}

// SetStatusCode sets the status to the post template set default response
func (o *PostTemplateSetDefault) SetStatusCode(code int) {
	o._statusCode = code
}

// WithPayload adds the payload to the post template set default response
func (o *PostTemplateSetDefault) WithPayload(payload *models.Error) *PostTemplateSetDefault {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the post template set default response
func (o *PostTemplateSetDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}

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