github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/objects/objects_class_references_put_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 // ObjectsClassReferencesPutOKCode is the HTTP code returned for type ObjectsClassReferencesPutOK 28 const ObjectsClassReferencesPutOKCode int = 200 29 30 /* 31 ObjectsClassReferencesPutOK Successfully replaced all the references. 32 33 swagger:response objectsClassReferencesPutOK 34 */ 35 type ObjectsClassReferencesPutOK struct { 36 } 37 38 // NewObjectsClassReferencesPutOK creates ObjectsClassReferencesPutOK with default headers values 39 func NewObjectsClassReferencesPutOK() *ObjectsClassReferencesPutOK { 40 41 return &ObjectsClassReferencesPutOK{} 42 } 43 44 // WriteResponse to the client 45 func (o *ObjectsClassReferencesPutOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 46 47 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 48 49 rw.WriteHeader(200) 50 } 51 52 // ObjectsClassReferencesPutBadRequestCode is the HTTP code returned for type ObjectsClassReferencesPutBadRequest 53 const ObjectsClassReferencesPutBadRequestCode int = 400 54 55 /* 56 ObjectsClassReferencesPutBadRequest Malformed request. 57 58 swagger:response objectsClassReferencesPutBadRequest 59 */ 60 type ObjectsClassReferencesPutBadRequest struct { 61 62 /* 63 In: Body 64 */ 65 Payload *models.ErrorResponse `json:"body,omitempty"` 66 } 67 68 // NewObjectsClassReferencesPutBadRequest creates ObjectsClassReferencesPutBadRequest with default headers values 69 func NewObjectsClassReferencesPutBadRequest() *ObjectsClassReferencesPutBadRequest { 70 71 return &ObjectsClassReferencesPutBadRequest{} 72 } 73 74 // WithPayload adds the payload to the objects class references put bad request response 75 func (o *ObjectsClassReferencesPutBadRequest) WithPayload(payload *models.ErrorResponse) *ObjectsClassReferencesPutBadRequest { 76 o.Payload = payload 77 return o 78 } 79 80 // SetPayload sets the payload to the objects class references put bad request response 81 func (o *ObjectsClassReferencesPutBadRequest) SetPayload(payload *models.ErrorResponse) { 82 o.Payload = payload 83 } 84 85 // WriteResponse to the client 86 func (o *ObjectsClassReferencesPutBadRequest) 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 // ObjectsClassReferencesPutUnauthorizedCode is the HTTP code returned for type ObjectsClassReferencesPutUnauthorized 98 const ObjectsClassReferencesPutUnauthorizedCode int = 401 99 100 /* 101 ObjectsClassReferencesPutUnauthorized Unauthorized or invalid credentials. 102 103 swagger:response objectsClassReferencesPutUnauthorized 104 */ 105 type ObjectsClassReferencesPutUnauthorized struct { 106 } 107 108 // NewObjectsClassReferencesPutUnauthorized creates ObjectsClassReferencesPutUnauthorized with default headers values 109 func NewObjectsClassReferencesPutUnauthorized() *ObjectsClassReferencesPutUnauthorized { 110 111 return &ObjectsClassReferencesPutUnauthorized{} 112 } 113 114 // WriteResponse to the client 115 func (o *ObjectsClassReferencesPutUnauthorized) 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 // ObjectsClassReferencesPutForbiddenCode is the HTTP code returned for type ObjectsClassReferencesPutForbidden 123 const ObjectsClassReferencesPutForbiddenCode int = 403 124 125 /* 126 ObjectsClassReferencesPutForbidden Forbidden 127 128 swagger:response objectsClassReferencesPutForbidden 129 */ 130 type ObjectsClassReferencesPutForbidden struct { 131 132 /* 133 In: Body 134 */ 135 Payload *models.ErrorResponse `json:"body,omitempty"` 136 } 137 138 // NewObjectsClassReferencesPutForbidden creates ObjectsClassReferencesPutForbidden with default headers values 139 func NewObjectsClassReferencesPutForbidden() *ObjectsClassReferencesPutForbidden { 140 141 return &ObjectsClassReferencesPutForbidden{} 142 } 143 144 // WithPayload adds the payload to the objects class references put forbidden response 145 func (o *ObjectsClassReferencesPutForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsClassReferencesPutForbidden { 146 o.Payload = payload 147 return o 148 } 149 150 // SetPayload sets the payload to the objects class references put forbidden response 151 func (o *ObjectsClassReferencesPutForbidden) SetPayload(payload *models.ErrorResponse) { 152 o.Payload = payload 153 } 154 155 // WriteResponse to the client 156 func (o *ObjectsClassReferencesPutForbidden) 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 // ObjectsClassReferencesPutNotFoundCode is the HTTP code returned for type ObjectsClassReferencesPutNotFound 168 const ObjectsClassReferencesPutNotFoundCode int = 404 169 170 /* 171 ObjectsClassReferencesPutNotFound Source object doesn't exist. 172 173 swagger:response objectsClassReferencesPutNotFound 174 */ 175 type ObjectsClassReferencesPutNotFound struct { 176 } 177 178 // NewObjectsClassReferencesPutNotFound creates ObjectsClassReferencesPutNotFound with default headers values 179 func NewObjectsClassReferencesPutNotFound() *ObjectsClassReferencesPutNotFound { 180 181 return &ObjectsClassReferencesPutNotFound{} 182 } 183 184 // WriteResponse to the client 185 func (o *ObjectsClassReferencesPutNotFound) 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 // ObjectsClassReferencesPutUnprocessableEntityCode is the HTTP code returned for type ObjectsClassReferencesPutUnprocessableEntity 193 const ObjectsClassReferencesPutUnprocessableEntityCode int = 422 194 195 /* 196 ObjectsClassReferencesPutUnprocessableEntity Request body is well-formed (i.e., syntactically correct), but semantically erroneous. Are you sure the property exists or that it is a class? 197 198 swagger:response objectsClassReferencesPutUnprocessableEntity 199 */ 200 type ObjectsClassReferencesPutUnprocessableEntity struct { 201 202 /* 203 In: Body 204 */ 205 Payload *models.ErrorResponse `json:"body,omitempty"` 206 } 207 208 // NewObjectsClassReferencesPutUnprocessableEntity creates ObjectsClassReferencesPutUnprocessableEntity with default headers values 209 func NewObjectsClassReferencesPutUnprocessableEntity() *ObjectsClassReferencesPutUnprocessableEntity { 210 211 return &ObjectsClassReferencesPutUnprocessableEntity{} 212 } 213 214 // WithPayload adds the payload to the objects class references put unprocessable entity response 215 func (o *ObjectsClassReferencesPutUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *ObjectsClassReferencesPutUnprocessableEntity { 216 o.Payload = payload 217 return o 218 } 219 220 // SetPayload sets the payload to the objects class references put unprocessable entity response 221 func (o *ObjectsClassReferencesPutUnprocessableEntity) SetPayload(payload *models.ErrorResponse) { 222 o.Payload = payload 223 } 224 225 // WriteResponse to the client 226 func (o *ObjectsClassReferencesPutUnprocessableEntity) 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 // ObjectsClassReferencesPutInternalServerErrorCode is the HTTP code returned for type ObjectsClassReferencesPutInternalServerError 238 const ObjectsClassReferencesPutInternalServerErrorCode int = 500 239 240 /* 241 ObjectsClassReferencesPutInternalServerError 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 objectsClassReferencesPutInternalServerError 244 */ 245 type ObjectsClassReferencesPutInternalServerError struct { 246 247 /* 248 In: Body 249 */ 250 Payload *models.ErrorResponse `json:"body,omitempty"` 251 } 252 253 // NewObjectsClassReferencesPutInternalServerError creates ObjectsClassReferencesPutInternalServerError with default headers values 254 func NewObjectsClassReferencesPutInternalServerError() *ObjectsClassReferencesPutInternalServerError { 255 256 return &ObjectsClassReferencesPutInternalServerError{} 257 } 258 259 // WithPayload adds the payload to the objects class references put internal server error response 260 func (o *ObjectsClassReferencesPutInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsClassReferencesPutInternalServerError { 261 o.Payload = payload 262 return o 263 } 264 265 // SetPayload sets the payload to the objects class references put internal server error response 266 func (o *ObjectsClassReferencesPutInternalServerError) SetPayload(payload *models.ErrorResponse) { 267 o.Payload = payload 268 } 269 270 // WriteResponse to the client 271 func (o *ObjectsClassReferencesPutInternalServerError) 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 }