github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/objects/objects_update_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  // ObjectsUpdateOKCode is the HTTP code returned for type ObjectsUpdateOK
    28  const ObjectsUpdateOKCode int = 200
    29  
    30  /*
    31  ObjectsUpdateOK Successfully received.
    32  
    33  swagger:response objectsUpdateOK
    34  */
    35  type ObjectsUpdateOK struct {
    36  
    37  	/*
    38  	  In: Body
    39  	*/
    40  	Payload *models.Object `json:"body,omitempty"`
    41  }
    42  
    43  // NewObjectsUpdateOK creates ObjectsUpdateOK with default headers values
    44  func NewObjectsUpdateOK() *ObjectsUpdateOK {
    45  
    46  	return &ObjectsUpdateOK{}
    47  }
    48  
    49  // WithPayload adds the payload to the objects update o k response
    50  func (o *ObjectsUpdateOK) WithPayload(payload *models.Object) *ObjectsUpdateOK {
    51  	o.Payload = payload
    52  	return o
    53  }
    54  
    55  // SetPayload sets the payload to the objects update o k response
    56  func (o *ObjectsUpdateOK) SetPayload(payload *models.Object) {
    57  	o.Payload = payload
    58  }
    59  
    60  // WriteResponse to the client
    61  func (o *ObjectsUpdateOK) 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  // ObjectsUpdateUnauthorizedCode is the HTTP code returned for type ObjectsUpdateUnauthorized
    73  const ObjectsUpdateUnauthorizedCode int = 401
    74  
    75  /*
    76  ObjectsUpdateUnauthorized Unauthorized or invalid credentials.
    77  
    78  swagger:response objectsUpdateUnauthorized
    79  */
    80  type ObjectsUpdateUnauthorized struct {
    81  }
    82  
    83  // NewObjectsUpdateUnauthorized creates ObjectsUpdateUnauthorized with default headers values
    84  func NewObjectsUpdateUnauthorized() *ObjectsUpdateUnauthorized {
    85  
    86  	return &ObjectsUpdateUnauthorized{}
    87  }
    88  
    89  // WriteResponse to the client
    90  func (o *ObjectsUpdateUnauthorized) 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  // ObjectsUpdateForbiddenCode is the HTTP code returned for type ObjectsUpdateForbidden
    98  const ObjectsUpdateForbiddenCode int = 403
    99  
   100  /*
   101  ObjectsUpdateForbidden Forbidden
   102  
   103  swagger:response objectsUpdateForbidden
   104  */
   105  type ObjectsUpdateForbidden struct {
   106  
   107  	/*
   108  	  In: Body
   109  	*/
   110  	Payload *models.ErrorResponse `json:"body,omitempty"`
   111  }
   112  
   113  // NewObjectsUpdateForbidden creates ObjectsUpdateForbidden with default headers values
   114  func NewObjectsUpdateForbidden() *ObjectsUpdateForbidden {
   115  
   116  	return &ObjectsUpdateForbidden{}
   117  }
   118  
   119  // WithPayload adds the payload to the objects update forbidden response
   120  func (o *ObjectsUpdateForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsUpdateForbidden {
   121  	o.Payload = payload
   122  	return o
   123  }
   124  
   125  // SetPayload sets the payload to the objects update forbidden response
   126  func (o *ObjectsUpdateForbidden) SetPayload(payload *models.ErrorResponse) {
   127  	o.Payload = payload
   128  }
   129  
   130  // WriteResponse to the client
   131  func (o *ObjectsUpdateForbidden) 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  // ObjectsUpdateNotFoundCode is the HTTP code returned for type ObjectsUpdateNotFound
   143  const ObjectsUpdateNotFoundCode int = 404
   144  
   145  /*
   146  ObjectsUpdateNotFound Successful query result but no resource was found.
   147  
   148  swagger:response objectsUpdateNotFound
   149  */
   150  type ObjectsUpdateNotFound struct {
   151  }
   152  
   153  // NewObjectsUpdateNotFound creates ObjectsUpdateNotFound with default headers values
   154  func NewObjectsUpdateNotFound() *ObjectsUpdateNotFound {
   155  
   156  	return &ObjectsUpdateNotFound{}
   157  }
   158  
   159  // WriteResponse to the client
   160  func (o *ObjectsUpdateNotFound) 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  // ObjectsUpdateUnprocessableEntityCode is the HTTP code returned for type ObjectsUpdateUnprocessableEntity
   168  const ObjectsUpdateUnprocessableEntityCode int = 422
   169  
   170  /*
   171  ObjectsUpdateUnprocessableEntity 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 objectsUpdateUnprocessableEntity
   174  */
   175  type ObjectsUpdateUnprocessableEntity struct {
   176  
   177  	/*
   178  	  In: Body
   179  	*/
   180  	Payload *models.ErrorResponse `json:"body,omitempty"`
   181  }
   182  
   183  // NewObjectsUpdateUnprocessableEntity creates ObjectsUpdateUnprocessableEntity with default headers values
   184  func NewObjectsUpdateUnprocessableEntity() *ObjectsUpdateUnprocessableEntity {
   185  
   186  	return &ObjectsUpdateUnprocessableEntity{}
   187  }
   188  
   189  // WithPayload adds the payload to the objects update unprocessable entity response
   190  func (o *ObjectsUpdateUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *ObjectsUpdateUnprocessableEntity {
   191  	o.Payload = payload
   192  	return o
   193  }
   194  
   195  // SetPayload sets the payload to the objects update unprocessable entity response
   196  func (o *ObjectsUpdateUnprocessableEntity) SetPayload(payload *models.ErrorResponse) {
   197  	o.Payload = payload
   198  }
   199  
   200  // WriteResponse to the client
   201  func (o *ObjectsUpdateUnprocessableEntity) 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  // ObjectsUpdateInternalServerErrorCode is the HTTP code returned for type ObjectsUpdateInternalServerError
   213  const ObjectsUpdateInternalServerErrorCode int = 500
   214  
   215  /*
   216  ObjectsUpdateInternalServerError 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 objectsUpdateInternalServerError
   219  */
   220  type ObjectsUpdateInternalServerError struct {
   221  
   222  	/*
   223  	  In: Body
   224  	*/
   225  	Payload *models.ErrorResponse `json:"body,omitempty"`
   226  }
   227  
   228  // NewObjectsUpdateInternalServerError creates ObjectsUpdateInternalServerError with default headers values
   229  func NewObjectsUpdateInternalServerError() *ObjectsUpdateInternalServerError {
   230  
   231  	return &ObjectsUpdateInternalServerError{}
   232  }
   233  
   234  // WithPayload adds the payload to the objects update internal server error response
   235  func (o *ObjectsUpdateInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsUpdateInternalServerError {
   236  	o.Payload = payload
   237  	return o
   238  }
   239  
   240  // SetPayload sets the payload to the objects update internal server error response
   241  func (o *ObjectsUpdateInternalServerError) SetPayload(payload *models.ErrorResponse) {
   242  	o.Payload = payload
   243  }
   244  
   245  // WriteResponse to the client
   246  func (o *ObjectsUpdateInternalServerError) 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  }