github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/objects/objects_class_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  // ObjectsClassReferencesCreateOKCode is the HTTP code returned for type ObjectsClassReferencesCreateOK
    28  const ObjectsClassReferencesCreateOKCode int = 200
    29  
    30  /*
    31  ObjectsClassReferencesCreateOK Successfully added the reference.
    32  
    33  swagger:response objectsClassReferencesCreateOK
    34  */
    35  type ObjectsClassReferencesCreateOK struct {
    36  }
    37  
    38  // NewObjectsClassReferencesCreateOK creates ObjectsClassReferencesCreateOK with default headers values
    39  func NewObjectsClassReferencesCreateOK() *ObjectsClassReferencesCreateOK {
    40  
    41  	return &ObjectsClassReferencesCreateOK{}
    42  }
    43  
    44  // WriteResponse to the client
    45  func (o *ObjectsClassReferencesCreateOK) 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  // ObjectsClassReferencesCreateBadRequestCode is the HTTP code returned for type ObjectsClassReferencesCreateBadRequest
    53  const ObjectsClassReferencesCreateBadRequestCode int = 400
    54  
    55  /*
    56  ObjectsClassReferencesCreateBadRequest Malformed request.
    57  
    58  swagger:response objectsClassReferencesCreateBadRequest
    59  */
    60  type ObjectsClassReferencesCreateBadRequest struct {
    61  
    62  	/*
    63  	  In: Body
    64  	*/
    65  	Payload *models.ErrorResponse `json:"body,omitempty"`
    66  }
    67  
    68  // NewObjectsClassReferencesCreateBadRequest creates ObjectsClassReferencesCreateBadRequest with default headers values
    69  func NewObjectsClassReferencesCreateBadRequest() *ObjectsClassReferencesCreateBadRequest {
    70  
    71  	return &ObjectsClassReferencesCreateBadRequest{}
    72  }
    73  
    74  // WithPayload adds the payload to the objects class references create bad request response
    75  func (o *ObjectsClassReferencesCreateBadRequest) WithPayload(payload *models.ErrorResponse) *ObjectsClassReferencesCreateBadRequest {
    76  	o.Payload = payload
    77  	return o
    78  }
    79  
    80  // SetPayload sets the payload to the objects class references create bad request response
    81  func (o *ObjectsClassReferencesCreateBadRequest) SetPayload(payload *models.ErrorResponse) {
    82  	o.Payload = payload
    83  }
    84  
    85  // WriteResponse to the client
    86  func (o *ObjectsClassReferencesCreateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    87  
    88  	rw.WriteHeader(400)
    89  	if o.Payload != nil {
    90  		payload := o.Payload
    91  		if err := producer.Produce(rw, payload); err != nil {
    92  			panic(err) // let the recovery middleware deal with this
    93  		}
    94  	}
    95  }
    96  
    97  // ObjectsClassReferencesCreateUnauthorizedCode is the HTTP code returned for type ObjectsClassReferencesCreateUnauthorized
    98  const ObjectsClassReferencesCreateUnauthorizedCode int = 401
    99  
   100  /*
   101  ObjectsClassReferencesCreateUnauthorized Unauthorized or invalid credentials.
   102  
   103  swagger:response objectsClassReferencesCreateUnauthorized
   104  */
   105  type ObjectsClassReferencesCreateUnauthorized struct {
   106  }
   107  
   108  // NewObjectsClassReferencesCreateUnauthorized creates ObjectsClassReferencesCreateUnauthorized with default headers values
   109  func NewObjectsClassReferencesCreateUnauthorized() *ObjectsClassReferencesCreateUnauthorized {
   110  
   111  	return &ObjectsClassReferencesCreateUnauthorized{}
   112  }
   113  
   114  // WriteResponse to the client
   115  func (o *ObjectsClassReferencesCreateUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   116  
   117  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
   118  
   119  	rw.WriteHeader(401)
   120  }
   121  
   122  // ObjectsClassReferencesCreateForbiddenCode is the HTTP code returned for type ObjectsClassReferencesCreateForbidden
   123  const ObjectsClassReferencesCreateForbiddenCode int = 403
   124  
   125  /*
   126  ObjectsClassReferencesCreateForbidden Forbidden
   127  
   128  swagger:response objectsClassReferencesCreateForbidden
   129  */
   130  type ObjectsClassReferencesCreateForbidden struct {
   131  
   132  	/*
   133  	  In: Body
   134  	*/
   135  	Payload *models.ErrorResponse `json:"body,omitempty"`
   136  }
   137  
   138  // NewObjectsClassReferencesCreateForbidden creates ObjectsClassReferencesCreateForbidden with default headers values
   139  func NewObjectsClassReferencesCreateForbidden() *ObjectsClassReferencesCreateForbidden {
   140  
   141  	return &ObjectsClassReferencesCreateForbidden{}
   142  }
   143  
   144  // WithPayload adds the payload to the objects class references create forbidden response
   145  func (o *ObjectsClassReferencesCreateForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsClassReferencesCreateForbidden {
   146  	o.Payload = payload
   147  	return o
   148  }
   149  
   150  // SetPayload sets the payload to the objects class references create forbidden response
   151  func (o *ObjectsClassReferencesCreateForbidden) SetPayload(payload *models.ErrorResponse) {
   152  	o.Payload = payload
   153  }
   154  
   155  // WriteResponse to the client
   156  func (o *ObjectsClassReferencesCreateForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   157  
   158  	rw.WriteHeader(403)
   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  // ObjectsClassReferencesCreateNotFoundCode is the HTTP code returned for type ObjectsClassReferencesCreateNotFound
   168  const ObjectsClassReferencesCreateNotFoundCode int = 404
   169  
   170  /*
   171  ObjectsClassReferencesCreateNotFound Source object doesn't exist.
   172  
   173  swagger:response objectsClassReferencesCreateNotFound
   174  */
   175  type ObjectsClassReferencesCreateNotFound struct {
   176  }
   177  
   178  // NewObjectsClassReferencesCreateNotFound creates ObjectsClassReferencesCreateNotFound with default headers values
   179  func NewObjectsClassReferencesCreateNotFound() *ObjectsClassReferencesCreateNotFound {
   180  
   181  	return &ObjectsClassReferencesCreateNotFound{}
   182  }
   183  
   184  // WriteResponse to the client
   185  func (o *ObjectsClassReferencesCreateNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   186  
   187  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
   188  
   189  	rw.WriteHeader(404)
   190  }
   191  
   192  // ObjectsClassReferencesCreateUnprocessableEntityCode is the HTTP code returned for type ObjectsClassReferencesCreateUnprocessableEntity
   193  const ObjectsClassReferencesCreateUnprocessableEntityCode int = 422
   194  
   195  /*
   196  ObjectsClassReferencesCreateUnprocessableEntity Request body is well-formed (i.e., syntactically correct), but semantically erroneous. Are you sure the property exists or that it is a class?
   197  
   198  swagger:response objectsClassReferencesCreateUnprocessableEntity
   199  */
   200  type ObjectsClassReferencesCreateUnprocessableEntity struct {
   201  
   202  	/*
   203  	  In: Body
   204  	*/
   205  	Payload *models.ErrorResponse `json:"body,omitempty"`
   206  }
   207  
   208  // NewObjectsClassReferencesCreateUnprocessableEntity creates ObjectsClassReferencesCreateUnprocessableEntity with default headers values
   209  func NewObjectsClassReferencesCreateUnprocessableEntity() *ObjectsClassReferencesCreateUnprocessableEntity {
   210  
   211  	return &ObjectsClassReferencesCreateUnprocessableEntity{}
   212  }
   213  
   214  // WithPayload adds the payload to the objects class references create unprocessable entity response
   215  func (o *ObjectsClassReferencesCreateUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *ObjectsClassReferencesCreateUnprocessableEntity {
   216  	o.Payload = payload
   217  	return o
   218  }
   219  
   220  // SetPayload sets the payload to the objects class references create unprocessable entity response
   221  func (o *ObjectsClassReferencesCreateUnprocessableEntity) SetPayload(payload *models.ErrorResponse) {
   222  	o.Payload = payload
   223  }
   224  
   225  // WriteResponse to the client
   226  func (o *ObjectsClassReferencesCreateUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   227  
   228  	rw.WriteHeader(422)
   229  	if o.Payload != nil {
   230  		payload := o.Payload
   231  		if err := producer.Produce(rw, payload); err != nil {
   232  			panic(err) // let the recovery middleware deal with this
   233  		}
   234  	}
   235  }
   236  
   237  // ObjectsClassReferencesCreateInternalServerErrorCode is the HTTP code returned for type ObjectsClassReferencesCreateInternalServerError
   238  const ObjectsClassReferencesCreateInternalServerErrorCode int = 500
   239  
   240  /*
   241  ObjectsClassReferencesCreateInternalServerError An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error.
   242  
   243  swagger:response objectsClassReferencesCreateInternalServerError
   244  */
   245  type ObjectsClassReferencesCreateInternalServerError struct {
   246  
   247  	/*
   248  	  In: Body
   249  	*/
   250  	Payload *models.ErrorResponse `json:"body,omitempty"`
   251  }
   252  
   253  // NewObjectsClassReferencesCreateInternalServerError creates ObjectsClassReferencesCreateInternalServerError with default headers values
   254  func NewObjectsClassReferencesCreateInternalServerError() *ObjectsClassReferencesCreateInternalServerError {
   255  
   256  	return &ObjectsClassReferencesCreateInternalServerError{}
   257  }
   258  
   259  // WithPayload adds the payload to the objects class references create internal server error response
   260  func (o *ObjectsClassReferencesCreateInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsClassReferencesCreateInternalServerError {
   261  	o.Payload = payload
   262  	return o
   263  }
   264  
   265  // SetPayload sets the payload to the objects class references create internal server error response
   266  func (o *ObjectsClassReferencesCreateInternalServerError) SetPayload(payload *models.ErrorResponse) {
   267  	o.Payload = payload
   268  }
   269  
   270  // WriteResponse to the client
   271  func (o *ObjectsClassReferencesCreateInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   272  
   273  	rw.WriteHeader(500)
   274  	if o.Payload != nil {
   275  		payload := o.Payload
   276  		if err := producer.Produce(rw, payload); err != nil {
   277  			panic(err) // let the recovery middleware deal with this
   278  		}
   279  	}
   280  }