github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/batch/batch_objects_delete_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 batch 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 // BatchObjectsDeleteOKCode is the HTTP code returned for type BatchObjectsDeleteOK 28 const BatchObjectsDeleteOKCode int = 200 29 30 /* 31 BatchObjectsDeleteOK Request succeeded, see response body to get detailed information about each batched item. 32 33 swagger:response batchObjectsDeleteOK 34 */ 35 type BatchObjectsDeleteOK struct { 36 37 /* 38 In: Body 39 */ 40 Payload *models.BatchDeleteResponse `json:"body,omitempty"` 41 } 42 43 // NewBatchObjectsDeleteOK creates BatchObjectsDeleteOK with default headers values 44 func NewBatchObjectsDeleteOK() *BatchObjectsDeleteOK { 45 46 return &BatchObjectsDeleteOK{} 47 } 48 49 // WithPayload adds the payload to the batch objects delete o k response 50 func (o *BatchObjectsDeleteOK) WithPayload(payload *models.BatchDeleteResponse) *BatchObjectsDeleteOK { 51 o.Payload = payload 52 return o 53 } 54 55 // SetPayload sets the payload to the batch objects delete o k response 56 func (o *BatchObjectsDeleteOK) SetPayload(payload *models.BatchDeleteResponse) { 57 o.Payload = payload 58 } 59 60 // WriteResponse to the client 61 func (o *BatchObjectsDeleteOK) 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 // BatchObjectsDeleteBadRequestCode is the HTTP code returned for type BatchObjectsDeleteBadRequest 73 const BatchObjectsDeleteBadRequestCode int = 400 74 75 /* 76 BatchObjectsDeleteBadRequest Malformed request. 77 78 swagger:response batchObjectsDeleteBadRequest 79 */ 80 type BatchObjectsDeleteBadRequest struct { 81 82 /* 83 In: Body 84 */ 85 Payload *models.ErrorResponse `json:"body,omitempty"` 86 } 87 88 // NewBatchObjectsDeleteBadRequest creates BatchObjectsDeleteBadRequest with default headers values 89 func NewBatchObjectsDeleteBadRequest() *BatchObjectsDeleteBadRequest { 90 91 return &BatchObjectsDeleteBadRequest{} 92 } 93 94 // WithPayload adds the payload to the batch objects delete bad request response 95 func (o *BatchObjectsDeleteBadRequest) WithPayload(payload *models.ErrorResponse) *BatchObjectsDeleteBadRequest { 96 o.Payload = payload 97 return o 98 } 99 100 // SetPayload sets the payload to the batch objects delete bad request response 101 func (o *BatchObjectsDeleteBadRequest) SetPayload(payload *models.ErrorResponse) { 102 o.Payload = payload 103 } 104 105 // WriteResponse to the client 106 func (o *BatchObjectsDeleteBadRequest) 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 // BatchObjectsDeleteUnauthorizedCode is the HTTP code returned for type BatchObjectsDeleteUnauthorized 118 const BatchObjectsDeleteUnauthorizedCode int = 401 119 120 /* 121 BatchObjectsDeleteUnauthorized Unauthorized or invalid credentials. 122 123 swagger:response batchObjectsDeleteUnauthorized 124 */ 125 type BatchObjectsDeleteUnauthorized struct { 126 } 127 128 // NewBatchObjectsDeleteUnauthorized creates BatchObjectsDeleteUnauthorized with default headers values 129 func NewBatchObjectsDeleteUnauthorized() *BatchObjectsDeleteUnauthorized { 130 131 return &BatchObjectsDeleteUnauthorized{} 132 } 133 134 // WriteResponse to the client 135 func (o *BatchObjectsDeleteUnauthorized) 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 // BatchObjectsDeleteForbiddenCode is the HTTP code returned for type BatchObjectsDeleteForbidden 143 const BatchObjectsDeleteForbiddenCode int = 403 144 145 /* 146 BatchObjectsDeleteForbidden Forbidden 147 148 swagger:response batchObjectsDeleteForbidden 149 */ 150 type BatchObjectsDeleteForbidden struct { 151 152 /* 153 In: Body 154 */ 155 Payload *models.ErrorResponse `json:"body,omitempty"` 156 } 157 158 // NewBatchObjectsDeleteForbidden creates BatchObjectsDeleteForbidden with default headers values 159 func NewBatchObjectsDeleteForbidden() *BatchObjectsDeleteForbidden { 160 161 return &BatchObjectsDeleteForbidden{} 162 } 163 164 // WithPayload adds the payload to the batch objects delete forbidden response 165 func (o *BatchObjectsDeleteForbidden) WithPayload(payload *models.ErrorResponse) *BatchObjectsDeleteForbidden { 166 o.Payload = payload 167 return o 168 } 169 170 // SetPayload sets the payload to the batch objects delete forbidden response 171 func (o *BatchObjectsDeleteForbidden) SetPayload(payload *models.ErrorResponse) { 172 o.Payload = payload 173 } 174 175 // WriteResponse to the client 176 func (o *BatchObjectsDeleteForbidden) 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 // BatchObjectsDeleteUnprocessableEntityCode is the HTTP code returned for type BatchObjectsDeleteUnprocessableEntity 188 const BatchObjectsDeleteUnprocessableEntityCode int = 422 189 190 /* 191 BatchObjectsDeleteUnprocessableEntity Request body is well-formed (i.e., syntactically correct), but semantically erroneous. Are you sure the class is defined in the configuration file? 192 193 swagger:response batchObjectsDeleteUnprocessableEntity 194 */ 195 type BatchObjectsDeleteUnprocessableEntity struct { 196 197 /* 198 In: Body 199 */ 200 Payload *models.ErrorResponse `json:"body,omitempty"` 201 } 202 203 // NewBatchObjectsDeleteUnprocessableEntity creates BatchObjectsDeleteUnprocessableEntity with default headers values 204 func NewBatchObjectsDeleteUnprocessableEntity() *BatchObjectsDeleteUnprocessableEntity { 205 206 return &BatchObjectsDeleteUnprocessableEntity{} 207 } 208 209 // WithPayload adds the payload to the batch objects delete unprocessable entity response 210 func (o *BatchObjectsDeleteUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *BatchObjectsDeleteUnprocessableEntity { 211 o.Payload = payload 212 return o 213 } 214 215 // SetPayload sets the payload to the batch objects delete unprocessable entity response 216 func (o *BatchObjectsDeleteUnprocessableEntity) SetPayload(payload *models.ErrorResponse) { 217 o.Payload = payload 218 } 219 220 // WriteResponse to the client 221 func (o *BatchObjectsDeleteUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 222 223 rw.WriteHeader(422) 224 if o.Payload != nil { 225 payload := o.Payload 226 if err := producer.Produce(rw, payload); err != nil { 227 panic(err) // let the recovery middleware deal with this 228 } 229 } 230 } 231 232 // BatchObjectsDeleteInternalServerErrorCode is the HTTP code returned for type BatchObjectsDeleteInternalServerError 233 const BatchObjectsDeleteInternalServerErrorCode int = 500 234 235 /* 236 BatchObjectsDeleteInternalServerError An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. 237 238 swagger:response batchObjectsDeleteInternalServerError 239 */ 240 type BatchObjectsDeleteInternalServerError struct { 241 242 /* 243 In: Body 244 */ 245 Payload *models.ErrorResponse `json:"body,omitempty"` 246 } 247 248 // NewBatchObjectsDeleteInternalServerError creates BatchObjectsDeleteInternalServerError with default headers values 249 func NewBatchObjectsDeleteInternalServerError() *BatchObjectsDeleteInternalServerError { 250 251 return &BatchObjectsDeleteInternalServerError{} 252 } 253 254 // WithPayload adds the payload to the batch objects delete internal server error response 255 func (o *BatchObjectsDeleteInternalServerError) WithPayload(payload *models.ErrorResponse) *BatchObjectsDeleteInternalServerError { 256 o.Payload = payload 257 return o 258 } 259 260 // SetPayload sets the payload to the batch objects delete internal server error response 261 func (o *BatchObjectsDeleteInternalServerError) SetPayload(payload *models.ErrorResponse) { 262 o.Payload = payload 263 } 264 265 // WriteResponse to the client 266 func (o *BatchObjectsDeleteInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 267 268 rw.WriteHeader(500) 269 if o.Payload != nil { 270 payload := o.Payload 271 if err := producer.Produce(rw, payload); err != nil { 272 panic(err) // let the recovery middleware deal with this 273 } 274 } 275 }