github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/objects/objects_class_get_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 // ObjectsClassGetOKCode is the HTTP code returned for type ObjectsClassGetOK 28 const ObjectsClassGetOKCode int = 200 29 30 /* 31 ObjectsClassGetOK Successful response. 32 33 swagger:response objectsClassGetOK 34 */ 35 type ObjectsClassGetOK struct { 36 37 /* 38 In: Body 39 */ 40 Payload *models.Object `json:"body,omitempty"` 41 } 42 43 // NewObjectsClassGetOK creates ObjectsClassGetOK with default headers values 44 func NewObjectsClassGetOK() *ObjectsClassGetOK { 45 46 return &ObjectsClassGetOK{} 47 } 48 49 // WithPayload adds the payload to the objects class get o k response 50 func (o *ObjectsClassGetOK) WithPayload(payload *models.Object) *ObjectsClassGetOK { 51 o.Payload = payload 52 return o 53 } 54 55 // SetPayload sets the payload to the objects class get o k response 56 func (o *ObjectsClassGetOK) SetPayload(payload *models.Object) { 57 o.Payload = payload 58 } 59 60 // WriteResponse to the client 61 func (o *ObjectsClassGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 62 63 rw.WriteHeader(200) 64 if o.Payload != nil { 65 payload := o.Payload 66 if err := producer.Produce(rw, payload); err != nil { 67 panic(err) // let the recovery middleware deal with this 68 } 69 } 70 } 71 72 // ObjectsClassGetBadRequestCode is the HTTP code returned for type ObjectsClassGetBadRequest 73 const ObjectsClassGetBadRequestCode int = 400 74 75 /* 76 ObjectsClassGetBadRequest Malformed request. 77 78 swagger:response objectsClassGetBadRequest 79 */ 80 type ObjectsClassGetBadRequest struct { 81 82 /* 83 In: Body 84 */ 85 Payload *models.ErrorResponse `json:"body,omitempty"` 86 } 87 88 // NewObjectsClassGetBadRequest creates ObjectsClassGetBadRequest with default headers values 89 func NewObjectsClassGetBadRequest() *ObjectsClassGetBadRequest { 90 91 return &ObjectsClassGetBadRequest{} 92 } 93 94 // WithPayload adds the payload to the objects class get bad request response 95 func (o *ObjectsClassGetBadRequest) WithPayload(payload *models.ErrorResponse) *ObjectsClassGetBadRequest { 96 o.Payload = payload 97 return o 98 } 99 100 // SetPayload sets the payload to the objects class get bad request response 101 func (o *ObjectsClassGetBadRequest) SetPayload(payload *models.ErrorResponse) { 102 o.Payload = payload 103 } 104 105 // WriteResponse to the client 106 func (o *ObjectsClassGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 107 108 rw.WriteHeader(400) 109 if o.Payload != nil { 110 payload := o.Payload 111 if err := producer.Produce(rw, payload); err != nil { 112 panic(err) // let the recovery middleware deal with this 113 } 114 } 115 } 116 117 // ObjectsClassGetUnauthorizedCode is the HTTP code returned for type ObjectsClassGetUnauthorized 118 const ObjectsClassGetUnauthorizedCode int = 401 119 120 /* 121 ObjectsClassGetUnauthorized Unauthorized or invalid credentials. 122 123 swagger:response objectsClassGetUnauthorized 124 */ 125 type ObjectsClassGetUnauthorized struct { 126 } 127 128 // NewObjectsClassGetUnauthorized creates ObjectsClassGetUnauthorized with default headers values 129 func NewObjectsClassGetUnauthorized() *ObjectsClassGetUnauthorized { 130 131 return &ObjectsClassGetUnauthorized{} 132 } 133 134 // WriteResponse to the client 135 func (o *ObjectsClassGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 136 137 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 138 139 rw.WriteHeader(401) 140 } 141 142 // ObjectsClassGetForbiddenCode is the HTTP code returned for type ObjectsClassGetForbidden 143 const ObjectsClassGetForbiddenCode int = 403 144 145 /* 146 ObjectsClassGetForbidden Forbidden 147 148 swagger:response objectsClassGetForbidden 149 */ 150 type ObjectsClassGetForbidden struct { 151 152 /* 153 In: Body 154 */ 155 Payload *models.ErrorResponse `json:"body,omitempty"` 156 } 157 158 // NewObjectsClassGetForbidden creates ObjectsClassGetForbidden with default headers values 159 func NewObjectsClassGetForbidden() *ObjectsClassGetForbidden { 160 161 return &ObjectsClassGetForbidden{} 162 } 163 164 // WithPayload adds the payload to the objects class get forbidden response 165 func (o *ObjectsClassGetForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsClassGetForbidden { 166 o.Payload = payload 167 return o 168 } 169 170 // SetPayload sets the payload to the objects class get forbidden response 171 func (o *ObjectsClassGetForbidden) SetPayload(payload *models.ErrorResponse) { 172 o.Payload = payload 173 } 174 175 // WriteResponse to the client 176 func (o *ObjectsClassGetForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 177 178 rw.WriteHeader(403) 179 if o.Payload != nil { 180 payload := o.Payload 181 if err := producer.Produce(rw, payload); err != nil { 182 panic(err) // let the recovery middleware deal with this 183 } 184 } 185 } 186 187 // ObjectsClassGetNotFoundCode is the HTTP code returned for type ObjectsClassGetNotFound 188 const ObjectsClassGetNotFoundCode int = 404 189 190 /* 191 ObjectsClassGetNotFound Successful query result but no resource was found. 192 193 swagger:response objectsClassGetNotFound 194 */ 195 type ObjectsClassGetNotFound struct { 196 } 197 198 // NewObjectsClassGetNotFound creates ObjectsClassGetNotFound with default headers values 199 func NewObjectsClassGetNotFound() *ObjectsClassGetNotFound { 200 201 return &ObjectsClassGetNotFound{} 202 } 203 204 // WriteResponse to the client 205 func (o *ObjectsClassGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 206 207 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 208 209 rw.WriteHeader(404) 210 } 211 212 // ObjectsClassGetUnprocessableEntityCode is the HTTP code returned for type ObjectsClassGetUnprocessableEntity 213 const ObjectsClassGetUnprocessableEntityCode int = 422 214 215 /* 216 ObjectsClassGetUnprocessableEntity Request is well-formed (i.e., syntactically correct), but erroneous. 217 218 swagger:response objectsClassGetUnprocessableEntity 219 */ 220 type ObjectsClassGetUnprocessableEntity struct { 221 222 /* 223 In: Body 224 */ 225 Payload *models.ErrorResponse `json:"body,omitempty"` 226 } 227 228 // NewObjectsClassGetUnprocessableEntity creates ObjectsClassGetUnprocessableEntity with default headers values 229 func NewObjectsClassGetUnprocessableEntity() *ObjectsClassGetUnprocessableEntity { 230 231 return &ObjectsClassGetUnprocessableEntity{} 232 } 233 234 // WithPayload adds the payload to the objects class get unprocessable entity response 235 func (o *ObjectsClassGetUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *ObjectsClassGetUnprocessableEntity { 236 o.Payload = payload 237 return o 238 } 239 240 // SetPayload sets the payload to the objects class get unprocessable entity response 241 func (o *ObjectsClassGetUnprocessableEntity) SetPayload(payload *models.ErrorResponse) { 242 o.Payload = payload 243 } 244 245 // WriteResponse to the client 246 func (o *ObjectsClassGetUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 247 248 rw.WriteHeader(422) 249 if o.Payload != nil { 250 payload := o.Payload 251 if err := producer.Produce(rw, payload); err != nil { 252 panic(err) // let the recovery middleware deal with this 253 } 254 } 255 } 256 257 // ObjectsClassGetInternalServerErrorCode is the HTTP code returned for type ObjectsClassGetInternalServerError 258 const ObjectsClassGetInternalServerErrorCode int = 500 259 260 /* 261 ObjectsClassGetInternalServerError An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. 262 263 swagger:response objectsClassGetInternalServerError 264 */ 265 type ObjectsClassGetInternalServerError struct { 266 267 /* 268 In: Body 269 */ 270 Payload *models.ErrorResponse `json:"body,omitempty"` 271 } 272 273 // NewObjectsClassGetInternalServerError creates ObjectsClassGetInternalServerError with default headers values 274 func NewObjectsClassGetInternalServerError() *ObjectsClassGetInternalServerError { 275 276 return &ObjectsClassGetInternalServerError{} 277 } 278 279 // WithPayload adds the payload to the objects class get internal server error response 280 func (o *ObjectsClassGetInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsClassGetInternalServerError { 281 o.Payload = payload 282 return o 283 } 284 285 // SetPayload sets the payload to the objects class get internal server error response 286 func (o *ObjectsClassGetInternalServerError) SetPayload(payload *models.ErrorResponse) { 287 o.Payload = payload 288 } 289 290 // WriteResponse to the client 291 func (o *ObjectsClassGetInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 292 293 rw.WriteHeader(500) 294 if o.Payload != nil { 295 payload := o.Payload 296 if err := producer.Produce(rw, payload); err != nil { 297 panic(err) // let the recovery middleware deal with this 298 } 299 } 300 }