github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/schema/schema_objects_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  // SchemaObjectsDeleteOKCode is the HTTP code returned for type SchemaObjectsDeleteOK
    28  const SchemaObjectsDeleteOKCode int = 200
    29  
    30  /*
    31  SchemaObjectsDeleteOK Removed the Object class from the schema.
    32  
    33  swagger:response schemaObjectsDeleteOK
    34  */
    35  type SchemaObjectsDeleteOK struct {
    36  }
    37  
    38  // NewSchemaObjectsDeleteOK creates SchemaObjectsDeleteOK with default headers values
    39  func NewSchemaObjectsDeleteOK() *SchemaObjectsDeleteOK {
    40  
    41  	return &SchemaObjectsDeleteOK{}
    42  }
    43  
    44  // WriteResponse to the client
    45  func (o *SchemaObjectsDeleteOK) 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  // SchemaObjectsDeleteBadRequestCode is the HTTP code returned for type SchemaObjectsDeleteBadRequest
    53  const SchemaObjectsDeleteBadRequestCode int = 400
    54  
    55  /*
    56  SchemaObjectsDeleteBadRequest Could not delete the Object class.
    57  
    58  swagger:response schemaObjectsDeleteBadRequest
    59  */
    60  type SchemaObjectsDeleteBadRequest struct {
    61  
    62  	/*
    63  	  In: Body
    64  	*/
    65  	Payload *models.ErrorResponse `json:"body,omitempty"`
    66  }
    67  
    68  // NewSchemaObjectsDeleteBadRequest creates SchemaObjectsDeleteBadRequest with default headers values
    69  func NewSchemaObjectsDeleteBadRequest() *SchemaObjectsDeleteBadRequest {
    70  
    71  	return &SchemaObjectsDeleteBadRequest{}
    72  }
    73  
    74  // WithPayload adds the payload to the schema objects delete bad request response
    75  func (o *SchemaObjectsDeleteBadRequest) WithPayload(payload *models.ErrorResponse) *SchemaObjectsDeleteBadRequest {
    76  	o.Payload = payload
    77  	return o
    78  }
    79  
    80  // SetPayload sets the payload to the schema objects delete bad request response
    81  func (o *SchemaObjectsDeleteBadRequest) SetPayload(payload *models.ErrorResponse) {
    82  	o.Payload = payload
    83  }
    84  
    85  // WriteResponse to the client
    86  func (o *SchemaObjectsDeleteBadRequest) 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  // SchemaObjectsDeleteUnauthorizedCode is the HTTP code returned for type SchemaObjectsDeleteUnauthorized
    98  const SchemaObjectsDeleteUnauthorizedCode int = 401
    99  
   100  /*
   101  SchemaObjectsDeleteUnauthorized Unauthorized or invalid credentials.
   102  
   103  swagger:response schemaObjectsDeleteUnauthorized
   104  */
   105  type SchemaObjectsDeleteUnauthorized struct {
   106  }
   107  
   108  // NewSchemaObjectsDeleteUnauthorized creates SchemaObjectsDeleteUnauthorized with default headers values
   109  func NewSchemaObjectsDeleteUnauthorized() *SchemaObjectsDeleteUnauthorized {
   110  
   111  	return &SchemaObjectsDeleteUnauthorized{}
   112  }
   113  
   114  // WriteResponse to the client
   115  func (o *SchemaObjectsDeleteUnauthorized) 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  // SchemaObjectsDeleteForbiddenCode is the HTTP code returned for type SchemaObjectsDeleteForbidden
   123  const SchemaObjectsDeleteForbiddenCode int = 403
   124  
   125  /*
   126  SchemaObjectsDeleteForbidden Forbidden
   127  
   128  swagger:response schemaObjectsDeleteForbidden
   129  */
   130  type SchemaObjectsDeleteForbidden struct {
   131  
   132  	/*
   133  	  In: Body
   134  	*/
   135  	Payload *models.ErrorResponse `json:"body,omitempty"`
   136  }
   137  
   138  // NewSchemaObjectsDeleteForbidden creates SchemaObjectsDeleteForbidden with default headers values
   139  func NewSchemaObjectsDeleteForbidden() *SchemaObjectsDeleteForbidden {
   140  
   141  	return &SchemaObjectsDeleteForbidden{}
   142  }
   143  
   144  // WithPayload adds the payload to the schema objects delete forbidden response
   145  func (o *SchemaObjectsDeleteForbidden) WithPayload(payload *models.ErrorResponse) *SchemaObjectsDeleteForbidden {
   146  	o.Payload = payload
   147  	return o
   148  }
   149  
   150  // SetPayload sets the payload to the schema objects delete forbidden response
   151  func (o *SchemaObjectsDeleteForbidden) SetPayload(payload *models.ErrorResponse) {
   152  	o.Payload = payload
   153  }
   154  
   155  // WriteResponse to the client
   156  func (o *SchemaObjectsDeleteForbidden) 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  // SchemaObjectsDeleteInternalServerErrorCode is the HTTP code returned for type SchemaObjectsDeleteInternalServerError
   168  const SchemaObjectsDeleteInternalServerErrorCode int = 500
   169  
   170  /*
   171  SchemaObjectsDeleteInternalServerError 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 schemaObjectsDeleteInternalServerError
   174  */
   175  type SchemaObjectsDeleteInternalServerError struct {
   176  
   177  	/*
   178  	  In: Body
   179  	*/
   180  	Payload *models.ErrorResponse `json:"body,omitempty"`
   181  }
   182  
   183  // NewSchemaObjectsDeleteInternalServerError creates SchemaObjectsDeleteInternalServerError with default headers values
   184  func NewSchemaObjectsDeleteInternalServerError() *SchemaObjectsDeleteInternalServerError {
   185  
   186  	return &SchemaObjectsDeleteInternalServerError{}
   187  }
   188  
   189  // WithPayload adds the payload to the schema objects delete internal server error response
   190  func (o *SchemaObjectsDeleteInternalServerError) WithPayload(payload *models.ErrorResponse) *SchemaObjectsDeleteInternalServerError {
   191  	o.Payload = payload
   192  	return o
   193  }
   194  
   195  // SetPayload sets the payload to the schema objects delete internal server error response
   196  func (o *SchemaObjectsDeleteInternalServerError) SetPayload(payload *models.ErrorResponse) {
   197  	o.Payload = payload
   198  }
   199  
   200  // WriteResponse to the client
   201  func (o *SchemaObjectsDeleteInternalServerError) 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  }