// Code generated by go-swagger; DO NOT EDIT. package service // 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_zrok" ) // ShareCreatedCode is the HTTP code returned for type ShareCreated const ShareCreatedCode int = 201 /* ShareCreated service created swagger:response shareCreated */ type ShareCreated struct { /* In: Body */ Payload *rest_model_zrok.ShareResponse `json:"body,omitempty"` } // NewShareCreated creates ShareCreated with default headers values func NewShareCreated() *ShareCreated { return &ShareCreated{} } // WithPayload adds the payload to the share created response func (o *ShareCreated) WithPayload(payload *rest_model_zrok.ShareResponse) *ShareCreated { o.Payload = payload return o } // SetPayload sets the payload to the share created response func (o *ShareCreated) SetPayload(payload *rest_model_zrok.ShareResponse) { o.Payload = payload } // WriteResponse to the client func (o *ShareCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(201) if o.Payload != nil { payload := o.Payload if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } } } // ShareUnauthorizedCode is the HTTP code returned for type ShareUnauthorized const ShareUnauthorizedCode int = 401 /* ShareUnauthorized unauthorized swagger:response shareUnauthorized */ type ShareUnauthorized struct { } // NewShareUnauthorized creates ShareUnauthorized with default headers values func NewShareUnauthorized() *ShareUnauthorized { return &ShareUnauthorized{} } // WriteResponse to the client func (o *ShareUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses rw.WriteHeader(401) } // ShareInternalServerErrorCode is the HTTP code returned for type ShareInternalServerError const ShareInternalServerErrorCode int = 500 /* ShareInternalServerError internal server error swagger:response shareInternalServerError */ type ShareInternalServerError struct { /* In: Body */ Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"` } // NewShareInternalServerError creates ShareInternalServerError with default headers values func NewShareInternalServerError() *ShareInternalServerError { return &ShareInternalServerError{} } // WithPayload adds the payload to the share internal server error response func (o *ShareInternalServerError) WithPayload(payload rest_model_zrok.ErrorMessage) *ShareInternalServerError { o.Payload = payload return o } // SetPayload sets the payload to the share internal server error response func (o *ShareInternalServerError) SetPayload(payload rest_model_zrok.ErrorMessage) { o.Payload = payload } // WriteResponse to the client func (o *ShareInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(500) payload := o.Payload if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } }