github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/objects/objects_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 // ObjectsPatchNoContentCode is the HTTP code returned for type ObjectsPatchNoContent 28 const ObjectsPatchNoContentCode int = 204 29 30 /* 31 ObjectsPatchNoContent Successfully applied. No content provided. 32 33 swagger:response objectsPatchNoContent 34 */ 35 type ObjectsPatchNoContent struct { 36 } 37 38 // NewObjectsPatchNoContent creates ObjectsPatchNoContent with default headers values 39 func NewObjectsPatchNoContent() *ObjectsPatchNoContent { 40 41 return &ObjectsPatchNoContent{} 42 } 43 44 // WriteResponse to the client 45 func (o *ObjectsPatchNoContent) 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 // ObjectsPatchBadRequestCode is the HTTP code returned for type ObjectsPatchBadRequest 53 const ObjectsPatchBadRequestCode int = 400 54 55 /* 56 ObjectsPatchBadRequest The patch-JSON is malformed. 57 58 swagger:response objectsPatchBadRequest 59 */ 60 type ObjectsPatchBadRequest struct { 61 } 62 63 // NewObjectsPatchBadRequest creates ObjectsPatchBadRequest with default headers values 64 func NewObjectsPatchBadRequest() *ObjectsPatchBadRequest { 65 66 return &ObjectsPatchBadRequest{} 67 } 68 69 // WriteResponse to the client 70 func (o *ObjectsPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 71 72 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 73 74 rw.WriteHeader(400) 75 } 76 77 // ObjectsPatchUnauthorizedCode is the HTTP code returned for type ObjectsPatchUnauthorized 78 const ObjectsPatchUnauthorizedCode int = 401 79 80 /* 81 ObjectsPatchUnauthorized Unauthorized or invalid credentials. 82 83 swagger:response objectsPatchUnauthorized 84 */ 85 type ObjectsPatchUnauthorized struct { 86 } 87 88 // NewObjectsPatchUnauthorized creates ObjectsPatchUnauthorized with default headers values 89 func NewObjectsPatchUnauthorized() *ObjectsPatchUnauthorized { 90 91 return &ObjectsPatchUnauthorized{} 92 } 93 94 // WriteResponse to the client 95 func (o *ObjectsPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 96 97 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 98 99 rw.WriteHeader(401) 100 } 101 102 // ObjectsPatchForbiddenCode is the HTTP code returned for type ObjectsPatchForbidden 103 const ObjectsPatchForbiddenCode int = 403 104 105 /* 106 ObjectsPatchForbidden Forbidden 107 108 swagger:response objectsPatchForbidden 109 */ 110 type ObjectsPatchForbidden struct { 111 112 /* 113 In: Body 114 */ 115 Payload *models.ErrorResponse `json:"body,omitempty"` 116 } 117 118 // NewObjectsPatchForbidden creates ObjectsPatchForbidden with default headers values 119 func NewObjectsPatchForbidden() *ObjectsPatchForbidden { 120 121 return &ObjectsPatchForbidden{} 122 } 123 124 // WithPayload adds the payload to the objects patch forbidden response 125 func (o *ObjectsPatchForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsPatchForbidden { 126 o.Payload = payload 127 return o 128 } 129 130 // SetPayload sets the payload to the objects patch forbidden response 131 func (o *ObjectsPatchForbidden) SetPayload(payload *models.ErrorResponse) { 132 o.Payload = payload 133 } 134 135 // WriteResponse to the client 136 func (o *ObjectsPatchForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 137 138 rw.WriteHeader(403) 139 if o.Payload != nil { 140 payload := o.Payload 141 if err := producer.Produce(rw, payload); err != nil { 142 panic(err) // let the recovery middleware deal with this 143 } 144 } 145 } 146 147 // ObjectsPatchNotFoundCode is the HTTP code returned for type ObjectsPatchNotFound 148 const ObjectsPatchNotFoundCode int = 404 149 150 /* 151 ObjectsPatchNotFound Successful query result but no resource was found. 152 153 swagger:response objectsPatchNotFound 154 */ 155 type ObjectsPatchNotFound struct { 156 } 157 158 // NewObjectsPatchNotFound creates ObjectsPatchNotFound with default headers values 159 func NewObjectsPatchNotFound() *ObjectsPatchNotFound { 160 161 return &ObjectsPatchNotFound{} 162 } 163 164 // WriteResponse to the client 165 func (o *ObjectsPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 166 167 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 168 169 rw.WriteHeader(404) 170 } 171 172 // ObjectsPatchUnprocessableEntityCode is the HTTP code returned for type ObjectsPatchUnprocessableEntity 173 const ObjectsPatchUnprocessableEntityCode int = 422 174 175 /* 176 ObjectsPatchUnprocessableEntity The patch-JSON is valid but unprocessable. 177 178 swagger:response objectsPatchUnprocessableEntity 179 */ 180 type ObjectsPatchUnprocessableEntity struct { 181 182 /* 183 In: Body 184 */ 185 Payload *models.ErrorResponse `json:"body,omitempty"` 186 } 187 188 // NewObjectsPatchUnprocessableEntity creates ObjectsPatchUnprocessableEntity with default headers values 189 func NewObjectsPatchUnprocessableEntity() *ObjectsPatchUnprocessableEntity { 190 191 return &ObjectsPatchUnprocessableEntity{} 192 } 193 194 // WithPayload adds the payload to the objects patch unprocessable entity response 195 func (o *ObjectsPatchUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *ObjectsPatchUnprocessableEntity { 196 o.Payload = payload 197 return o 198 } 199 200 // SetPayload sets the payload to the objects patch unprocessable entity response 201 func (o *ObjectsPatchUnprocessableEntity) SetPayload(payload *models.ErrorResponse) { 202 o.Payload = payload 203 } 204 205 // WriteResponse to the client 206 func (o *ObjectsPatchUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 207 208 rw.WriteHeader(422) 209 if o.Payload != nil { 210 payload := o.Payload 211 if err := producer.Produce(rw, payload); err != nil { 212 panic(err) // let the recovery middleware deal with this 213 } 214 } 215 } 216 217 // ObjectsPatchInternalServerErrorCode is the HTTP code returned for type ObjectsPatchInternalServerError 218 const ObjectsPatchInternalServerErrorCode int = 500 219 220 /* 221 ObjectsPatchInternalServerError An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. 222 223 swagger:response objectsPatchInternalServerError 224 */ 225 type ObjectsPatchInternalServerError struct { 226 227 /* 228 In: Body 229 */ 230 Payload *models.ErrorResponse `json:"body,omitempty"` 231 } 232 233 // NewObjectsPatchInternalServerError creates ObjectsPatchInternalServerError with default headers values 234 func NewObjectsPatchInternalServerError() *ObjectsPatchInternalServerError { 235 236 return &ObjectsPatchInternalServerError{} 237 } 238 239 // WithPayload adds the payload to the objects patch internal server error response 240 func (o *ObjectsPatchInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsPatchInternalServerError { 241 o.Payload = payload 242 return o 243 } 244 245 // SetPayload sets the payload to the objects patch internal server error response 246 func (o *ObjectsPatchInternalServerError) SetPayload(payload *models.ErrorResponse) { 247 o.Payload = payload 248 } 249 250 // WriteResponse to the client 251 func (o *ObjectsPatchInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 252 253 rw.WriteHeader(500) 254 if o.Payload != nil { 255 payload := o.Payload 256 if err := producer.Produce(rw, payload); err != nil { 257 panic(err) // let the recovery middleware deal with this 258 } 259 } 260 }