github.com/circl-dev/go-swagger@v0.31.0/examples/generated/restapi/operations/pet/update_pet_responses.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package pet 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "net/http" 10 11 "github.com/circl-dev/runtime" 12 ) 13 14 // UpdatePetBadRequestCode is the HTTP code returned for type UpdatePetBadRequest 15 const UpdatePetBadRequestCode int = 400 16 17 /*UpdatePetBadRequest Invalid ID supplied 18 19 swagger:response updatePetBadRequest 20 */ 21 type UpdatePetBadRequest struct { 22 } 23 24 // NewUpdatePetBadRequest creates UpdatePetBadRequest with default headers values 25 func NewUpdatePetBadRequest() *UpdatePetBadRequest { 26 27 return &UpdatePetBadRequest{} 28 } 29 30 // WriteResponse to the client 31 func (o *UpdatePetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 32 33 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 34 35 rw.WriteHeader(400) 36 } 37 38 // UpdatePetNotFoundCode is the HTTP code returned for type UpdatePetNotFound 39 const UpdatePetNotFoundCode int = 404 40 41 /*UpdatePetNotFound Pet not found 42 43 swagger:response updatePetNotFound 44 */ 45 type UpdatePetNotFound struct { 46 } 47 48 // NewUpdatePetNotFound creates UpdatePetNotFound with default headers values 49 func NewUpdatePetNotFound() *UpdatePetNotFound { 50 51 return &UpdatePetNotFound{} 52 } 53 54 // WriteResponse to the client 55 func (o *UpdatePetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 56 57 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 58 59 rw.WriteHeader(404) 60 } 61 62 // UpdatePetMethodNotAllowedCode is the HTTP code returned for type UpdatePetMethodNotAllowed 63 const UpdatePetMethodNotAllowedCode int = 405 64 65 /*UpdatePetMethodNotAllowed Validation exception 66 67 swagger:response updatePetMethodNotAllowed 68 */ 69 type UpdatePetMethodNotAllowed struct { 70 } 71 72 // NewUpdatePetMethodNotAllowed creates UpdatePetMethodNotAllowed with default headers values 73 func NewUpdatePetMethodNotAllowed() *UpdatePetMethodNotAllowed { 74 75 return &UpdatePetMethodNotAllowed{} 76 } 77 78 // WriteResponse to the client 79 func (o *UpdatePetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 80 81 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 82 83 rw.WriteHeader(405) 84 }