github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/schema/schema_objects_get_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  // SchemaObjectsGetOKCode is the HTTP code returned for type SchemaObjectsGetOK
    28  const SchemaObjectsGetOKCode int = 200
    29  
    30  /*
    31  SchemaObjectsGetOK Found the Class, returned as body
    32  
    33  swagger:response schemaObjectsGetOK
    34  */
    35  type SchemaObjectsGetOK struct {
    36  
    37  	/*
    38  	  In: Body
    39  	*/
    40  	Payload *models.Class `json:"body,omitempty"`
    41  }
    42  
    43  // NewSchemaObjectsGetOK creates SchemaObjectsGetOK with default headers values
    44  func NewSchemaObjectsGetOK() *SchemaObjectsGetOK {
    45  
    46  	return &SchemaObjectsGetOK{}
    47  }
    48  
    49  // WithPayload adds the payload to the schema objects get o k response
    50  func (o *SchemaObjectsGetOK) WithPayload(payload *models.Class) *SchemaObjectsGetOK {
    51  	o.Payload = payload
    52  	return o
    53  }
    54  
    55  // SetPayload sets the payload to the schema objects get o k response
    56  func (o *SchemaObjectsGetOK) SetPayload(payload *models.Class) {
    57  	o.Payload = payload
    58  }
    59  
    60  // WriteResponse to the client
    61  func (o *SchemaObjectsGetOK) 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  // SchemaObjectsGetUnauthorizedCode is the HTTP code returned for type SchemaObjectsGetUnauthorized
    73  const SchemaObjectsGetUnauthorizedCode int = 401
    74  
    75  /*
    76  SchemaObjectsGetUnauthorized Unauthorized or invalid credentials.
    77  
    78  swagger:response schemaObjectsGetUnauthorized
    79  */
    80  type SchemaObjectsGetUnauthorized struct {
    81  }
    82  
    83  // NewSchemaObjectsGetUnauthorized creates SchemaObjectsGetUnauthorized with default headers values
    84  func NewSchemaObjectsGetUnauthorized() *SchemaObjectsGetUnauthorized {
    85  
    86  	return &SchemaObjectsGetUnauthorized{}
    87  }
    88  
    89  // WriteResponse to the client
    90  func (o *SchemaObjectsGetUnauthorized) 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  // SchemaObjectsGetForbiddenCode is the HTTP code returned for type SchemaObjectsGetForbidden
    98  const SchemaObjectsGetForbiddenCode int = 403
    99  
   100  /*
   101  SchemaObjectsGetForbidden Forbidden
   102  
   103  swagger:response schemaObjectsGetForbidden
   104  */
   105  type SchemaObjectsGetForbidden struct {
   106  
   107  	/*
   108  	  In: Body
   109  	*/
   110  	Payload *models.ErrorResponse `json:"body,omitempty"`
   111  }
   112  
   113  // NewSchemaObjectsGetForbidden creates SchemaObjectsGetForbidden with default headers values
   114  func NewSchemaObjectsGetForbidden() *SchemaObjectsGetForbidden {
   115  
   116  	return &SchemaObjectsGetForbidden{}
   117  }
   118  
   119  // WithPayload adds the payload to the schema objects get forbidden response
   120  func (o *SchemaObjectsGetForbidden) WithPayload(payload *models.ErrorResponse) *SchemaObjectsGetForbidden {
   121  	o.Payload = payload
   122  	return o
   123  }
   124  
   125  // SetPayload sets the payload to the schema objects get forbidden response
   126  func (o *SchemaObjectsGetForbidden) SetPayload(payload *models.ErrorResponse) {
   127  	o.Payload = payload
   128  }
   129  
   130  // WriteResponse to the client
   131  func (o *SchemaObjectsGetForbidden) 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  // SchemaObjectsGetNotFoundCode is the HTTP code returned for type SchemaObjectsGetNotFound
   143  const SchemaObjectsGetNotFoundCode int = 404
   144  
   145  /*
   146  SchemaObjectsGetNotFound This class does not exist
   147  
   148  swagger:response schemaObjectsGetNotFound
   149  */
   150  type SchemaObjectsGetNotFound struct {
   151  }
   152  
   153  // NewSchemaObjectsGetNotFound creates SchemaObjectsGetNotFound with default headers values
   154  func NewSchemaObjectsGetNotFound() *SchemaObjectsGetNotFound {
   155  
   156  	return &SchemaObjectsGetNotFound{}
   157  }
   158  
   159  // WriteResponse to the client
   160  func (o *SchemaObjectsGetNotFound) 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  // SchemaObjectsGetInternalServerErrorCode is the HTTP code returned for type SchemaObjectsGetInternalServerError
   168  const SchemaObjectsGetInternalServerErrorCode int = 500
   169  
   170  /*
   171  SchemaObjectsGetInternalServerError 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 schemaObjectsGetInternalServerError
   174  */
   175  type SchemaObjectsGetInternalServerError struct {
   176  
   177  	/*
   178  	  In: Body
   179  	*/
   180  	Payload *models.ErrorResponse `json:"body,omitempty"`
   181  }
   182  
   183  // NewSchemaObjectsGetInternalServerError creates SchemaObjectsGetInternalServerError with default headers values
   184  func NewSchemaObjectsGetInternalServerError() *SchemaObjectsGetInternalServerError {
   185  
   186  	return &SchemaObjectsGetInternalServerError{}
   187  }
   188  
   189  // WithPayload adds the payload to the schema objects get internal server error response
   190  func (o *SchemaObjectsGetInternalServerError) WithPayload(payload *models.ErrorResponse) *SchemaObjectsGetInternalServerError {
   191  	o.Payload = payload
   192  	return o
   193  }
   194  
   195  // SetPayload sets the payload to the schema objects get internal server error response
   196  func (o *SchemaObjectsGetInternalServerError) SetPayload(payload *models.ErrorResponse) {
   197  	o.Payload = payload
   198  }
   199  
   200  // WriteResponse to the client
   201  func (o *SchemaObjectsGetInternalServerError) 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  }