github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/objects/objects_class_put_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  // ObjectsClassPutOKCode is the HTTP code returned for type ObjectsClassPutOK
    28  const ObjectsClassPutOKCode int = 200
    29  
    30  /*
    31  ObjectsClassPutOK Successfully received.
    32  
    33  swagger:response objectsClassPutOK
    34  */
    35  type ObjectsClassPutOK struct {
    36  
    37  	/*
    38  	  In: Body
    39  	*/
    40  	Payload *models.Object `json:"body,omitempty"`
    41  }
    42  
    43  // NewObjectsClassPutOK creates ObjectsClassPutOK with default headers values
    44  func NewObjectsClassPutOK() *ObjectsClassPutOK {
    45  
    46  	return &ObjectsClassPutOK{}
    47  }
    48  
    49  // WithPayload adds the payload to the objects class put o k response
    50  func (o *ObjectsClassPutOK) WithPayload(payload *models.Object) *ObjectsClassPutOK {
    51  	o.Payload = payload
    52  	return o
    53  }
    54  
    55  // SetPayload sets the payload to the objects class put o k response
    56  func (o *ObjectsClassPutOK) SetPayload(payload *models.Object) {
    57  	o.Payload = payload
    58  }
    59  
    60  // WriteResponse to the client
    61  func (o *ObjectsClassPutOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    62  
    63  	rw.WriteHeader(200)
    64  	if o.Payload != nil {
    65  		payload := o.Payload
    66  		if err := producer.Produce(rw, payload); err != nil {
    67  			panic(err) // let the recovery middleware deal with this
    68  		}
    69  	}
    70  }
    71  
    72  // ObjectsClassPutUnauthorizedCode is the HTTP code returned for type ObjectsClassPutUnauthorized
    73  const ObjectsClassPutUnauthorizedCode int = 401
    74  
    75  /*
    76  ObjectsClassPutUnauthorized Unauthorized or invalid credentials.
    77  
    78  swagger:response objectsClassPutUnauthorized
    79  */
    80  type ObjectsClassPutUnauthorized struct {
    81  }
    82  
    83  // NewObjectsClassPutUnauthorized creates ObjectsClassPutUnauthorized with default headers values
    84  func NewObjectsClassPutUnauthorized() *ObjectsClassPutUnauthorized {
    85  
    86  	return &ObjectsClassPutUnauthorized{}
    87  }
    88  
    89  // WriteResponse to the client
    90  func (o *ObjectsClassPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    91  
    92  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    93  
    94  	rw.WriteHeader(401)
    95  }
    96  
    97  // ObjectsClassPutForbiddenCode is the HTTP code returned for type ObjectsClassPutForbidden
    98  const ObjectsClassPutForbiddenCode int = 403
    99  
   100  /*
   101  ObjectsClassPutForbidden Forbidden
   102  
   103  swagger:response objectsClassPutForbidden
   104  */
   105  type ObjectsClassPutForbidden struct {
   106  
   107  	/*
   108  	  In: Body
   109  	*/
   110  	Payload *models.ErrorResponse `json:"body,omitempty"`
   111  }
   112  
   113  // NewObjectsClassPutForbidden creates ObjectsClassPutForbidden with default headers values
   114  func NewObjectsClassPutForbidden() *ObjectsClassPutForbidden {
   115  
   116  	return &ObjectsClassPutForbidden{}
   117  }
   118  
   119  // WithPayload adds the payload to the objects class put forbidden response
   120  func (o *ObjectsClassPutForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsClassPutForbidden {
   121  	o.Payload = payload
   122  	return o
   123  }
   124  
   125  // SetPayload sets the payload to the objects class put forbidden response
   126  func (o *ObjectsClassPutForbidden) SetPayload(payload *models.ErrorResponse) {
   127  	o.Payload = payload
   128  }
   129  
   130  // WriteResponse to the client
   131  func (o *ObjectsClassPutForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   132  
   133  	rw.WriteHeader(403)
   134  	if o.Payload != nil {
   135  		payload := o.Payload
   136  		if err := producer.Produce(rw, payload); err != nil {
   137  			panic(err) // let the recovery middleware deal with this
   138  		}
   139  	}
   140  }
   141  
   142  // ObjectsClassPutNotFoundCode is the HTTP code returned for type ObjectsClassPutNotFound
   143  const ObjectsClassPutNotFoundCode int = 404
   144  
   145  /*
   146  ObjectsClassPutNotFound Successful query result but no resource was found.
   147  
   148  swagger:response objectsClassPutNotFound
   149  */
   150  type ObjectsClassPutNotFound struct {
   151  }
   152  
   153  // NewObjectsClassPutNotFound creates ObjectsClassPutNotFound with default headers values
   154  func NewObjectsClassPutNotFound() *ObjectsClassPutNotFound {
   155  
   156  	return &ObjectsClassPutNotFound{}
   157  }
   158  
   159  // WriteResponse to the client
   160  func (o *ObjectsClassPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   161  
   162  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
   163  
   164  	rw.WriteHeader(404)
   165  }
   166  
   167  // ObjectsClassPutUnprocessableEntityCode is the HTTP code returned for type ObjectsClassPutUnprocessableEntity
   168  const ObjectsClassPutUnprocessableEntityCode int = 422
   169  
   170  /*
   171  ObjectsClassPutUnprocessableEntity Request body is well-formed (i.e., syntactically correct), but semantically erroneous. Are you sure the class is defined in the configuration file?
   172  
   173  swagger:response objectsClassPutUnprocessableEntity
   174  */
   175  type ObjectsClassPutUnprocessableEntity struct {
   176  
   177  	/*
   178  	  In: Body
   179  	*/
   180  	Payload *models.ErrorResponse `json:"body,omitempty"`
   181  }
   182  
   183  // NewObjectsClassPutUnprocessableEntity creates ObjectsClassPutUnprocessableEntity with default headers values
   184  func NewObjectsClassPutUnprocessableEntity() *ObjectsClassPutUnprocessableEntity {
   185  
   186  	return &ObjectsClassPutUnprocessableEntity{}
   187  }
   188  
   189  // WithPayload adds the payload to the objects class put unprocessable entity response
   190  func (o *ObjectsClassPutUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *ObjectsClassPutUnprocessableEntity {
   191  	o.Payload = payload
   192  	return o
   193  }
   194  
   195  // SetPayload sets the payload to the objects class put unprocessable entity response
   196  func (o *ObjectsClassPutUnprocessableEntity) SetPayload(payload *models.ErrorResponse) {
   197  	o.Payload = payload
   198  }
   199  
   200  // WriteResponse to the client
   201  func (o *ObjectsClassPutUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   202  
   203  	rw.WriteHeader(422)
   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  }
   211  
   212  // ObjectsClassPutInternalServerErrorCode is the HTTP code returned for type ObjectsClassPutInternalServerError
   213  const ObjectsClassPutInternalServerErrorCode int = 500
   214  
   215  /*
   216  ObjectsClassPutInternalServerError An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error.
   217  
   218  swagger:response objectsClassPutInternalServerError
   219  */
   220  type ObjectsClassPutInternalServerError struct {
   221  
   222  	/*
   223  	  In: Body
   224  	*/
   225  	Payload *models.ErrorResponse `json:"body,omitempty"`
   226  }
   227  
   228  // NewObjectsClassPutInternalServerError creates ObjectsClassPutInternalServerError with default headers values
   229  func NewObjectsClassPutInternalServerError() *ObjectsClassPutInternalServerError {
   230  
   231  	return &ObjectsClassPutInternalServerError{}
   232  }
   233  
   234  // WithPayload adds the payload to the objects class put internal server error response
   235  func (o *ObjectsClassPutInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsClassPutInternalServerError {
   236  	o.Payload = payload
   237  	return o
   238  }
   239  
   240  // SetPayload sets the payload to the objects class put internal server error response
   241  func (o *ObjectsClassPutInternalServerError) SetPayload(payload *models.ErrorResponse) {
   242  	o.Payload = payload
   243  }
   244  
   245  // WriteResponse to the client
   246  func (o *ObjectsClassPutInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   247  
   248  	rw.WriteHeader(500)
   249  	if o.Payload != nil {
   250  		payload := o.Payload
   251  		if err := producer.Produce(rw, payload); err != nil {
   252  			panic(err) // let the recovery middleware deal with this
   253  		}
   254  	}
   255  }