github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/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/go-openapi/runtime" 12 ) 13 14 // UpdatePetBadRequestCode is the HTTP code returned for type UpdatePetBadRequest 15 const UpdatePetBadRequestCode int = 400 16 17 /* 18 UpdatePetBadRequest Invalid ID supplied 19 20 swagger:response updatePetBadRequest 21 */ 22 type UpdatePetBadRequest struct { 23 } 24 25 // NewUpdatePetBadRequest creates UpdatePetBadRequest with default headers values 26 func NewUpdatePetBadRequest() *UpdatePetBadRequest { 27 28 return &UpdatePetBadRequest{} 29 } 30 31 // WriteResponse to the client 32 func (o *UpdatePetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 33 34 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 35 36 rw.WriteHeader(400) 37 } 38 39 // UpdatePetNotFoundCode is the HTTP code returned for type UpdatePetNotFound 40 const UpdatePetNotFoundCode int = 404 41 42 /* 43 UpdatePetNotFound Pet not found 44 45 swagger:response updatePetNotFound 46 */ 47 type UpdatePetNotFound struct { 48 } 49 50 // NewUpdatePetNotFound creates UpdatePetNotFound with default headers values 51 func NewUpdatePetNotFound() *UpdatePetNotFound { 52 53 return &UpdatePetNotFound{} 54 } 55 56 // WriteResponse to the client 57 func (o *UpdatePetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 58 59 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 60 61 rw.WriteHeader(404) 62 } 63 64 // UpdatePetMethodNotAllowedCode is the HTTP code returned for type UpdatePetMethodNotAllowed 65 const UpdatePetMethodNotAllowedCode int = 405 66 67 /* 68 UpdatePetMethodNotAllowed Validation exception 69 70 swagger:response updatePetMethodNotAllowed 71 */ 72 type UpdatePetMethodNotAllowed struct { 73 } 74 75 // NewUpdatePetMethodNotAllowed creates UpdatePetMethodNotAllowed with default headers values 76 func NewUpdatePetMethodNotAllowed() *UpdatePetMethodNotAllowed { 77 78 return &UpdatePetMethodNotAllowed{} 79 } 80 81 // WriteResponse to the client 82 func (o *UpdatePetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 83 84 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 85 86 rw.WriteHeader(405) 87 }