github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/objects/objects_class_patch_responses.go (about) 1 // _ _ 2 // __ _____ __ ___ ___ __ _| |_ ___ 3 // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ 4 // \ V V / __/ (_| |\ V /| | (_| | || __/ 5 // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| 6 // 7 // Copyright © 2016 - 2024 Weaviate B.V. All rights reserved. 8 // 9 // CONTACT: hello@weaviate.io 10 // 11 12 // Code generated by go-swagger; DO NOT EDIT. 13 14 package objects 15 16 // This file was generated by the swagger tool. 17 // Editing this file might prove futile when you re-run the swagger generate command 18 19 import ( 20 "net/http" 21 22 "github.com/go-openapi/runtime" 23 24 "github.com/weaviate/weaviate/entities/models" 25 ) 26 27 // ObjectsClassPatchNoContentCode is the HTTP code returned for type ObjectsClassPatchNoContent 28 const ObjectsClassPatchNoContentCode int = 204 29 30 /* 31 ObjectsClassPatchNoContent Successfully applied. No content provided. 32 33 swagger:response objectsClassPatchNoContent 34 */ 35 type ObjectsClassPatchNoContent struct { 36 } 37 38 // NewObjectsClassPatchNoContent creates ObjectsClassPatchNoContent with default headers values 39 func NewObjectsClassPatchNoContent() *ObjectsClassPatchNoContent { 40 41 return &ObjectsClassPatchNoContent{} 42 } 43 44 // WriteResponse to the client 45 func (o *ObjectsClassPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 46 47 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 48 49 rw.WriteHeader(204) 50 } 51 52 // ObjectsClassPatchBadRequestCode is the HTTP code returned for type ObjectsClassPatchBadRequest 53 const ObjectsClassPatchBadRequestCode int = 400 54 55 /* 56 ObjectsClassPatchBadRequest The patch-JSON is malformed. 57 58 swagger:response objectsClassPatchBadRequest 59 */ 60 type ObjectsClassPatchBadRequest struct { 61 62 /* 63 In: Body 64 */ 65 Payload *models.ErrorResponse `json:"body,omitempty"` 66 } 67 68 // NewObjectsClassPatchBadRequest creates ObjectsClassPatchBadRequest with default headers values 69 func NewObjectsClassPatchBadRequest() *ObjectsClassPatchBadRequest { 70 71 return &ObjectsClassPatchBadRequest{} 72 } 73 74 // WithPayload adds the payload to the objects class patch bad request response 75 func (o *ObjectsClassPatchBadRequest) WithPayload(payload *models.ErrorResponse) *ObjectsClassPatchBadRequest { 76 o.Payload = payload 77 return o 78 } 79 80 // SetPayload sets the payload to the objects class patch bad request response 81 func (o *ObjectsClassPatchBadRequest) SetPayload(payload *models.ErrorResponse) { 82 o.Payload = payload 83 } 84 85 // WriteResponse to the client 86 func (o *ObjectsClassPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 87 88 rw.WriteHeader(400) 89 if o.Payload != nil { 90 payload := o.Payload 91 if err := producer.Produce(rw, payload); err != nil { 92 panic(err) // let the recovery middleware deal with this 93 } 94 } 95 } 96 97 // ObjectsClassPatchUnauthorizedCode is the HTTP code returned for type ObjectsClassPatchUnauthorized 98 const ObjectsClassPatchUnauthorizedCode int = 401 99 100 /* 101 ObjectsClassPatchUnauthorized Unauthorized or invalid credentials. 102 103 swagger:response objectsClassPatchUnauthorized 104 */ 105 type ObjectsClassPatchUnauthorized struct { 106 } 107 108 // NewObjectsClassPatchUnauthorized creates ObjectsClassPatchUnauthorized with default headers values 109 func NewObjectsClassPatchUnauthorized() *ObjectsClassPatchUnauthorized { 110 111 return &ObjectsClassPatchUnauthorized{} 112 } 113 114 // WriteResponse to the client 115 func (o *ObjectsClassPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 116 117 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 118 119 rw.WriteHeader(401) 120 } 121 122 // ObjectsClassPatchForbiddenCode is the HTTP code returned for type ObjectsClassPatchForbidden 123 const ObjectsClassPatchForbiddenCode int = 403 124 125 /* 126 ObjectsClassPatchForbidden Forbidden 127 128 swagger:response objectsClassPatchForbidden 129 */ 130 type ObjectsClassPatchForbidden struct { 131 132 /* 133 In: Body 134 */ 135 Payload *models.ErrorResponse `json:"body,omitempty"` 136 } 137 138 // NewObjectsClassPatchForbidden creates ObjectsClassPatchForbidden with default headers values 139 func NewObjectsClassPatchForbidden() *ObjectsClassPatchForbidden { 140 141 return &ObjectsClassPatchForbidden{} 142 } 143 144 // WithPayload adds the payload to the objects class patch forbidden response 145 func (o *ObjectsClassPatchForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsClassPatchForbidden { 146 o.Payload = payload 147 return o 148 } 149 150 // SetPayload sets the payload to the objects class patch forbidden response 151 func (o *ObjectsClassPatchForbidden) SetPayload(payload *models.ErrorResponse) { 152 o.Payload = payload 153 } 154 155 // WriteResponse to the client 156 func (o *ObjectsClassPatchForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 157 158 rw.WriteHeader(403) 159 if o.Payload != nil { 160 payload := o.Payload 161 if err := producer.Produce(rw, payload); err != nil { 162 panic(err) // let the recovery middleware deal with this 163 } 164 } 165 } 166 167 // ObjectsClassPatchNotFoundCode is the HTTP code returned for type ObjectsClassPatchNotFound 168 const ObjectsClassPatchNotFoundCode int = 404 169 170 /* 171 ObjectsClassPatchNotFound Successful query result but no resource was found. 172 173 swagger:response objectsClassPatchNotFound 174 */ 175 type ObjectsClassPatchNotFound struct { 176 } 177 178 // NewObjectsClassPatchNotFound creates ObjectsClassPatchNotFound with default headers values 179 func NewObjectsClassPatchNotFound() *ObjectsClassPatchNotFound { 180 181 return &ObjectsClassPatchNotFound{} 182 } 183 184 // WriteResponse to the client 185 func (o *ObjectsClassPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 186 187 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 188 189 rw.WriteHeader(404) 190 } 191 192 // ObjectsClassPatchUnprocessableEntityCode is the HTTP code returned for type ObjectsClassPatchUnprocessableEntity 193 const ObjectsClassPatchUnprocessableEntityCode int = 422 194 195 /* 196 ObjectsClassPatchUnprocessableEntity The patch-JSON is valid but unprocessable. 197 198 swagger:response objectsClassPatchUnprocessableEntity 199 */ 200 type ObjectsClassPatchUnprocessableEntity struct { 201 202 /* 203 In: Body 204 */ 205 Payload *models.ErrorResponse `json:"body,omitempty"` 206 } 207 208 // NewObjectsClassPatchUnprocessableEntity creates ObjectsClassPatchUnprocessableEntity with default headers values 209 func NewObjectsClassPatchUnprocessableEntity() *ObjectsClassPatchUnprocessableEntity { 210 211 return &ObjectsClassPatchUnprocessableEntity{} 212 } 213 214 // WithPayload adds the payload to the objects class patch unprocessable entity response 215 func (o *ObjectsClassPatchUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *ObjectsClassPatchUnprocessableEntity { 216 o.Payload = payload 217 return o 218 } 219 220 // SetPayload sets the payload to the objects class patch unprocessable entity response 221 func (o *ObjectsClassPatchUnprocessableEntity) SetPayload(payload *models.ErrorResponse) { 222 o.Payload = payload 223 } 224 225 // WriteResponse to the client 226 func (o *ObjectsClassPatchUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 227 228 rw.WriteHeader(422) 229 if o.Payload != nil { 230 payload := o.Payload 231 if err := producer.Produce(rw, payload); err != nil { 232 panic(err) // let the recovery middleware deal with this 233 } 234 } 235 } 236 237 // ObjectsClassPatchInternalServerErrorCode is the HTTP code returned for type ObjectsClassPatchInternalServerError 238 const ObjectsClassPatchInternalServerErrorCode int = 500 239 240 /* 241 ObjectsClassPatchInternalServerError An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. 242 243 swagger:response objectsClassPatchInternalServerError 244 */ 245 type ObjectsClassPatchInternalServerError struct { 246 247 /* 248 In: Body 249 */ 250 Payload *models.ErrorResponse `json:"body,omitempty"` 251 } 252 253 // NewObjectsClassPatchInternalServerError creates ObjectsClassPatchInternalServerError with default headers values 254 func NewObjectsClassPatchInternalServerError() *ObjectsClassPatchInternalServerError { 255 256 return &ObjectsClassPatchInternalServerError{} 257 } 258 259 // WithPayload adds the payload to the objects class patch internal server error response 260 func (o *ObjectsClassPatchInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsClassPatchInternalServerError { 261 o.Payload = payload 262 return o 263 } 264 265 // SetPayload sets the payload to the objects class patch internal server error response 266 func (o *ObjectsClassPatchInternalServerError) SetPayload(payload *models.ErrorResponse) { 267 o.Payload = payload 268 } 269 270 // WriteResponse to the client 271 func (o *ObjectsClassPatchInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 272 273 rw.WriteHeader(500) 274 if o.Payload != nil { 275 payload := o.Payload 276 if err := producer.Produce(rw, payload); err != nil { 277 panic(err) // let the recovery middleware deal with this 278 } 279 } 280 }