github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/schema/tenants_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 schema 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 // TenantsDeleteOKCode is the HTTP code returned for type TenantsDeleteOK 28 const TenantsDeleteOKCode int = 200 29 30 /* 31 TenantsDeleteOK Deleted tenants from specified class. 32 33 swagger:response tenantsDeleteOK 34 */ 35 type TenantsDeleteOK struct { 36 } 37 38 // NewTenantsDeleteOK creates TenantsDeleteOK with default headers values 39 func NewTenantsDeleteOK() *TenantsDeleteOK { 40 41 return &TenantsDeleteOK{} 42 } 43 44 // WriteResponse to the client 45 func (o *TenantsDeleteOK) 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 // TenantsDeleteUnauthorizedCode is the HTTP code returned for type TenantsDeleteUnauthorized 53 const TenantsDeleteUnauthorizedCode int = 401 54 55 /* 56 TenantsDeleteUnauthorized Unauthorized or invalid credentials. 57 58 swagger:response tenantsDeleteUnauthorized 59 */ 60 type TenantsDeleteUnauthorized struct { 61 } 62 63 // NewTenantsDeleteUnauthorized creates TenantsDeleteUnauthorized with default headers values 64 func NewTenantsDeleteUnauthorized() *TenantsDeleteUnauthorized { 65 66 return &TenantsDeleteUnauthorized{} 67 } 68 69 // WriteResponse to the client 70 func (o *TenantsDeleteUnauthorized) 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 // TenantsDeleteForbiddenCode is the HTTP code returned for type TenantsDeleteForbidden 78 const TenantsDeleteForbiddenCode int = 403 79 80 /* 81 TenantsDeleteForbidden Forbidden 82 83 swagger:response tenantsDeleteForbidden 84 */ 85 type TenantsDeleteForbidden struct { 86 87 /* 88 In: Body 89 */ 90 Payload *models.ErrorResponse `json:"body,omitempty"` 91 } 92 93 // NewTenantsDeleteForbidden creates TenantsDeleteForbidden with default headers values 94 func NewTenantsDeleteForbidden() *TenantsDeleteForbidden { 95 96 return &TenantsDeleteForbidden{} 97 } 98 99 // WithPayload adds the payload to the tenants delete forbidden response 100 func (o *TenantsDeleteForbidden) WithPayload(payload *models.ErrorResponse) *TenantsDeleteForbidden { 101 o.Payload = payload 102 return o 103 } 104 105 // SetPayload sets the payload to the tenants delete forbidden response 106 func (o *TenantsDeleteForbidden) SetPayload(payload *models.ErrorResponse) { 107 o.Payload = payload 108 } 109 110 // WriteResponse to the client 111 func (o *TenantsDeleteForbidden) 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 // TenantsDeleteUnprocessableEntityCode is the HTTP code returned for type TenantsDeleteUnprocessableEntity 123 const TenantsDeleteUnprocessableEntityCode int = 422 124 125 /* 126 TenantsDeleteUnprocessableEntity Invalid Tenant class 127 128 swagger:response tenantsDeleteUnprocessableEntity 129 */ 130 type TenantsDeleteUnprocessableEntity struct { 131 132 /* 133 In: Body 134 */ 135 Payload *models.ErrorResponse `json:"body,omitempty"` 136 } 137 138 // NewTenantsDeleteUnprocessableEntity creates TenantsDeleteUnprocessableEntity with default headers values 139 func NewTenantsDeleteUnprocessableEntity() *TenantsDeleteUnprocessableEntity { 140 141 return &TenantsDeleteUnprocessableEntity{} 142 } 143 144 // WithPayload adds the payload to the tenants delete unprocessable entity response 145 func (o *TenantsDeleteUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *TenantsDeleteUnprocessableEntity { 146 o.Payload = payload 147 return o 148 } 149 150 // SetPayload sets the payload to the tenants delete unprocessable entity response 151 func (o *TenantsDeleteUnprocessableEntity) SetPayload(payload *models.ErrorResponse) { 152 o.Payload = payload 153 } 154 155 // WriteResponse to the client 156 func (o *TenantsDeleteUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 157 158 rw.WriteHeader(422) 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 // TenantsDeleteInternalServerErrorCode is the HTTP code returned for type TenantsDeleteInternalServerError 168 const TenantsDeleteInternalServerErrorCode int = 500 169 170 /* 171 TenantsDeleteInternalServerError An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. 172 173 swagger:response tenantsDeleteInternalServerError 174 */ 175 type TenantsDeleteInternalServerError struct { 176 177 /* 178 In: Body 179 */ 180 Payload *models.ErrorResponse `json:"body,omitempty"` 181 } 182 183 // NewTenantsDeleteInternalServerError creates TenantsDeleteInternalServerError with default headers values 184 func NewTenantsDeleteInternalServerError() *TenantsDeleteInternalServerError { 185 186 return &TenantsDeleteInternalServerError{} 187 } 188 189 // WithPayload adds the payload to the tenants delete internal server error response 190 func (o *TenantsDeleteInternalServerError) WithPayload(payload *models.ErrorResponse) *TenantsDeleteInternalServerError { 191 o.Payload = payload 192 return o 193 } 194 195 // SetPayload sets the payload to the tenants delete internal server error response 196 func (o *TenantsDeleteInternalServerError) SetPayload(payload *models.ErrorResponse) { 197 o.Payload = payload 198 } 199 200 // WriteResponse to the client 201 func (o *TenantsDeleteInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 202 203 rw.WriteHeader(500) 204 if o.Payload != nil { 205 payload := o.Payload 206 if err := producer.Produce(rw, payload); err != nil { 207 panic(err) // let the recovery middleware deal with this 208 } 209 } 210 }