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