github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/objects/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 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 // ObjectsDeleteNoContentCode is the HTTP code returned for type ObjectsDeleteNoContent 28 const ObjectsDeleteNoContentCode int = 204 29 30 /* 31 ObjectsDeleteNoContent Successfully deleted. 32 33 swagger:response objectsDeleteNoContent 34 */ 35 type ObjectsDeleteNoContent struct { 36 } 37 38 // NewObjectsDeleteNoContent creates ObjectsDeleteNoContent with default headers values 39 func NewObjectsDeleteNoContent() *ObjectsDeleteNoContent { 40 41 return &ObjectsDeleteNoContent{} 42 } 43 44 // WriteResponse to the client 45 func (o *ObjectsDeleteNoContent) 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 // ObjectsDeleteUnauthorizedCode is the HTTP code returned for type ObjectsDeleteUnauthorized 53 const ObjectsDeleteUnauthorizedCode int = 401 54 55 /* 56 ObjectsDeleteUnauthorized Unauthorized or invalid credentials. 57 58 swagger:response objectsDeleteUnauthorized 59 */ 60 type ObjectsDeleteUnauthorized struct { 61 } 62 63 // NewObjectsDeleteUnauthorized creates ObjectsDeleteUnauthorized with default headers values 64 func NewObjectsDeleteUnauthorized() *ObjectsDeleteUnauthorized { 65 66 return &ObjectsDeleteUnauthorized{} 67 } 68 69 // WriteResponse to the client 70 func (o *ObjectsDeleteUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 71 72 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 73 74 rw.WriteHeader(401) 75 } 76 77 // ObjectsDeleteForbiddenCode is the HTTP code returned for type ObjectsDeleteForbidden 78 const ObjectsDeleteForbiddenCode int = 403 79 80 /* 81 ObjectsDeleteForbidden Forbidden 82 83 swagger:response objectsDeleteForbidden 84 */ 85 type ObjectsDeleteForbidden struct { 86 87 /* 88 In: Body 89 */ 90 Payload *models.ErrorResponse `json:"body,omitempty"` 91 } 92 93 // NewObjectsDeleteForbidden creates ObjectsDeleteForbidden with default headers values 94 func NewObjectsDeleteForbidden() *ObjectsDeleteForbidden { 95 96 return &ObjectsDeleteForbidden{} 97 } 98 99 // WithPayload adds the payload to the objects delete forbidden response 100 func (o *ObjectsDeleteForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsDeleteForbidden { 101 o.Payload = payload 102 return o 103 } 104 105 // SetPayload sets the payload to the objects delete forbidden response 106 func (o *ObjectsDeleteForbidden) SetPayload(payload *models.ErrorResponse) { 107 o.Payload = payload 108 } 109 110 // WriteResponse to the client 111 func (o *ObjectsDeleteForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 112 113 rw.WriteHeader(403) 114 if o.Payload != nil { 115 payload := o.Payload 116 if err := producer.Produce(rw, payload); err != nil { 117 panic(err) // let the recovery middleware deal with this 118 } 119 } 120 } 121 122 // ObjectsDeleteNotFoundCode is the HTTP code returned for type ObjectsDeleteNotFound 123 const ObjectsDeleteNotFoundCode int = 404 124 125 /* 126 ObjectsDeleteNotFound Successful query result but no resource was found. 127 128 swagger:response objectsDeleteNotFound 129 */ 130 type ObjectsDeleteNotFound struct { 131 } 132 133 // NewObjectsDeleteNotFound creates ObjectsDeleteNotFound with default headers values 134 func NewObjectsDeleteNotFound() *ObjectsDeleteNotFound { 135 136 return &ObjectsDeleteNotFound{} 137 } 138 139 // WriteResponse to the client 140 func (o *ObjectsDeleteNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 141 142 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 143 144 rw.WriteHeader(404) 145 } 146 147 // ObjectsDeleteInternalServerErrorCode is the HTTP code returned for type ObjectsDeleteInternalServerError 148 const ObjectsDeleteInternalServerErrorCode int = 500 149 150 /* 151 ObjectsDeleteInternalServerError An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. 152 153 swagger:response objectsDeleteInternalServerError 154 */ 155 type ObjectsDeleteInternalServerError struct { 156 157 /* 158 In: Body 159 */ 160 Payload *models.ErrorResponse `json:"body,omitempty"` 161 } 162 163 // NewObjectsDeleteInternalServerError creates ObjectsDeleteInternalServerError with default headers values 164 func NewObjectsDeleteInternalServerError() *ObjectsDeleteInternalServerError { 165 166 return &ObjectsDeleteInternalServerError{} 167 } 168 169 // WithPayload adds the payload to the objects delete internal server error response 170 func (o *ObjectsDeleteInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsDeleteInternalServerError { 171 o.Payload = payload 172 return o 173 } 174 175 // SetPayload sets the payload to the objects delete internal server error response 176 func (o *ObjectsDeleteInternalServerError) SetPayload(payload *models.ErrorResponse) { 177 o.Payload = payload 178 } 179 180 // WriteResponse to the client 181 func (o *ObjectsDeleteInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 182 183 rw.WriteHeader(500) 184 if o.Payload != nil { 185 payload := o.Payload 186 if err := producer.Produce(rw, payload); err != nil { 187 panic(err) // let the recovery middleware deal with this 188 } 189 } 190 }