github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/objects/objects_references_create_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 // ObjectsReferencesCreateOKCode is the HTTP code returned for type ObjectsReferencesCreateOK 28 const ObjectsReferencesCreateOKCode int = 200 29 30 /* 31 ObjectsReferencesCreateOK Successfully added the reference. 32 33 swagger:response objectsReferencesCreateOK 34 */ 35 type ObjectsReferencesCreateOK struct { 36 } 37 38 // NewObjectsReferencesCreateOK creates ObjectsReferencesCreateOK with default headers values 39 func NewObjectsReferencesCreateOK() *ObjectsReferencesCreateOK { 40 41 return &ObjectsReferencesCreateOK{} 42 } 43 44 // WriteResponse to the client 45 func (o *ObjectsReferencesCreateOK) 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 // ObjectsReferencesCreateUnauthorizedCode is the HTTP code returned for type ObjectsReferencesCreateUnauthorized 53 const ObjectsReferencesCreateUnauthorizedCode int = 401 54 55 /* 56 ObjectsReferencesCreateUnauthorized Unauthorized or invalid credentials. 57 58 swagger:response objectsReferencesCreateUnauthorized 59 */ 60 type ObjectsReferencesCreateUnauthorized struct { 61 } 62 63 // NewObjectsReferencesCreateUnauthorized creates ObjectsReferencesCreateUnauthorized with default headers values 64 func NewObjectsReferencesCreateUnauthorized() *ObjectsReferencesCreateUnauthorized { 65 66 return &ObjectsReferencesCreateUnauthorized{} 67 } 68 69 // WriteResponse to the client 70 func (o *ObjectsReferencesCreateUnauthorized) 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 // ObjectsReferencesCreateForbiddenCode is the HTTP code returned for type ObjectsReferencesCreateForbidden 78 const ObjectsReferencesCreateForbiddenCode int = 403 79 80 /* 81 ObjectsReferencesCreateForbidden Forbidden 82 83 swagger:response objectsReferencesCreateForbidden 84 */ 85 type ObjectsReferencesCreateForbidden struct { 86 87 /* 88 In: Body 89 */ 90 Payload *models.ErrorResponse `json:"body,omitempty"` 91 } 92 93 // NewObjectsReferencesCreateForbidden creates ObjectsReferencesCreateForbidden with default headers values 94 func NewObjectsReferencesCreateForbidden() *ObjectsReferencesCreateForbidden { 95 96 return &ObjectsReferencesCreateForbidden{} 97 } 98 99 // WithPayload adds the payload to the objects references create forbidden response 100 func (o *ObjectsReferencesCreateForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsReferencesCreateForbidden { 101 o.Payload = payload 102 return o 103 } 104 105 // SetPayload sets the payload to the objects references create forbidden response 106 func (o *ObjectsReferencesCreateForbidden) SetPayload(payload *models.ErrorResponse) { 107 o.Payload = payload 108 } 109 110 // WriteResponse to the client 111 func (o *ObjectsReferencesCreateForbidden) 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 // ObjectsReferencesCreateUnprocessableEntityCode is the HTTP code returned for type ObjectsReferencesCreateUnprocessableEntity 123 const ObjectsReferencesCreateUnprocessableEntityCode int = 422 124 125 /* 126 ObjectsReferencesCreateUnprocessableEntity Request body is well-formed (i.e., syntactically correct), but semantically erroneous. Are you sure the property exists or that it is a class? 127 128 swagger:response objectsReferencesCreateUnprocessableEntity 129 */ 130 type ObjectsReferencesCreateUnprocessableEntity struct { 131 132 /* 133 In: Body 134 */ 135 Payload *models.ErrorResponse `json:"body,omitempty"` 136 } 137 138 // NewObjectsReferencesCreateUnprocessableEntity creates ObjectsReferencesCreateUnprocessableEntity with default headers values 139 func NewObjectsReferencesCreateUnprocessableEntity() *ObjectsReferencesCreateUnprocessableEntity { 140 141 return &ObjectsReferencesCreateUnprocessableEntity{} 142 } 143 144 // WithPayload adds the payload to the objects references create unprocessable entity response 145 func (o *ObjectsReferencesCreateUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *ObjectsReferencesCreateUnprocessableEntity { 146 o.Payload = payload 147 return o 148 } 149 150 // SetPayload sets the payload to the objects references create unprocessable entity response 151 func (o *ObjectsReferencesCreateUnprocessableEntity) SetPayload(payload *models.ErrorResponse) { 152 o.Payload = payload 153 } 154 155 // WriteResponse to the client 156 func (o *ObjectsReferencesCreateUnprocessableEntity) 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 // ObjectsReferencesCreateInternalServerErrorCode is the HTTP code returned for type ObjectsReferencesCreateInternalServerError 168 const ObjectsReferencesCreateInternalServerErrorCode int = 500 169 170 /* 171 ObjectsReferencesCreateInternalServerError 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 objectsReferencesCreateInternalServerError 174 */ 175 type ObjectsReferencesCreateInternalServerError struct { 176 177 /* 178 In: Body 179 */ 180 Payload *models.ErrorResponse `json:"body,omitempty"` 181 } 182 183 // NewObjectsReferencesCreateInternalServerError creates ObjectsReferencesCreateInternalServerError with default headers values 184 func NewObjectsReferencesCreateInternalServerError() *ObjectsReferencesCreateInternalServerError { 185 186 return &ObjectsReferencesCreateInternalServerError{} 187 } 188 189 // WithPayload adds the payload to the objects references create internal server error response 190 func (o *ObjectsReferencesCreateInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsReferencesCreateInternalServerError { 191 o.Payload = payload 192 return o 193 } 194 195 // SetPayload sets the payload to the objects references create internal server error response 196 func (o *ObjectsReferencesCreateInternalServerError) SetPayload(payload *models.ErrorResponse) { 197 o.Payload = payload 198 } 199 200 // WriteResponse to the client 201 func (o *ObjectsReferencesCreateInternalServerError) 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 }