// Code generated by go-swagger; DO NOT EDIT. package agent // 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" ) // PingOKCode is the HTTP code returned for type PingOK const PingOKCode int = 200 /* PingOK ok swagger:response pingOK */ type PingOK struct { /* In: Body */ Payload *PingOKBody `json:"body,omitempty"` } // NewPingOK creates PingOK with default headers values func NewPingOK() *PingOK { return &PingOK{} } // WithPayload adds the payload to the ping o k response func (o *PingOK) WithPayload(payload *PingOKBody) *PingOK { o.Payload = payload return o } // SetPayload sets the payload to the ping o k response func (o *PingOK) SetPayload(payload *PingOKBody) { o.Payload = payload } // WriteResponse to the client func (o *PingOK) 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 } } } // PingUnauthorizedCode is the HTTP code returned for type PingUnauthorized const PingUnauthorizedCode int = 401 /* PingUnauthorized unauthorized swagger:response pingUnauthorized */ type PingUnauthorized struct { } // NewPingUnauthorized creates PingUnauthorized with default headers values func NewPingUnauthorized() *PingUnauthorized { return &PingUnauthorized{} } // WriteResponse to the client func (o *PingUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses rw.WriteHeader(401) } // PingInternalServerErrorCode is the HTTP code returned for type PingInternalServerError const PingInternalServerErrorCode int = 500 /* PingInternalServerError internal server error swagger:response pingInternalServerError */ type PingInternalServerError struct { } // NewPingInternalServerError creates PingInternalServerError with default headers values func NewPingInternalServerError() *PingInternalServerError { return &PingInternalServerError{} } // WriteResponse to the client func (o *PingInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses rw.WriteHeader(500) } // PingBadGatewayCode is the HTTP code returned for type PingBadGateway const PingBadGatewayCode int = 502 /* PingBadGateway bad gateway; agent not reachable swagger:response pingBadGateway */ type PingBadGateway struct { } // NewPingBadGateway creates PingBadGateway with default headers values func NewPingBadGateway() *PingBadGateway { return &PingBadGateway{} } // WriteResponse to the client func (o *PingBadGateway) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses rw.WriteHeader(502) }