zrok/rest_zrok_server/operations/metadata/get_responses.go
2022-07-22 10:52:36 -04:00

59 lines
1.2 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package metadata
// 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/openziti-test-kitchen/zrok/rest_model"
)
// GetOKCode is the HTTP code returned for type GetOK
const GetOKCode int = 200
/*GetOK Retrieve the current server version
swagger:response getOK
*/
type GetOK struct {
/*
In: Body
*/
Payload *rest_model.Version `json:"body,omitempty"`
}
// NewGetOK creates GetOK with default headers values
func NewGetOK() *GetOK {
return &GetOK{}
}
// WithPayload adds the payload to the get o k response
func (o *GetOK) WithPayload(payload *rest_model.Version) *GetOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get o k response
func (o *GetOK) SetPayload(payload *rest_model.Version) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetOK) 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
}
}
}