github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/schema/schema_cluster_status_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  // SchemaClusterStatusOKCode is the HTTP code returned for type SchemaClusterStatusOK
    28  const SchemaClusterStatusOKCode int = 200
    29  
    30  /*
    31  SchemaClusterStatusOK The schema in the cluster is in sync.
    32  
    33  swagger:response schemaClusterStatusOK
    34  */
    35  type SchemaClusterStatusOK struct {
    36  
    37  	/*
    38  	  In: Body
    39  	*/
    40  	Payload *models.SchemaClusterStatus `json:"body,omitempty"`
    41  }
    42  
    43  // NewSchemaClusterStatusOK creates SchemaClusterStatusOK with default headers values
    44  func NewSchemaClusterStatusOK() *SchemaClusterStatusOK {
    45  
    46  	return &SchemaClusterStatusOK{}
    47  }
    48  
    49  // WithPayload adds the payload to the schema cluster status o k response
    50  func (o *SchemaClusterStatusOK) WithPayload(payload *models.SchemaClusterStatus) *SchemaClusterStatusOK {
    51  	o.Payload = payload
    52  	return o
    53  }
    54  
    55  // SetPayload sets the payload to the schema cluster status o k response
    56  func (o *SchemaClusterStatusOK) SetPayload(payload *models.SchemaClusterStatus) {
    57  	o.Payload = payload
    58  }
    59  
    60  // WriteResponse to the client
    61  func (o *SchemaClusterStatusOK) 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  // SchemaClusterStatusInternalServerErrorCode is the HTTP code returned for type SchemaClusterStatusInternalServerError
    73  const SchemaClusterStatusInternalServerErrorCode int = 500
    74  
    75  /*
    76  SchemaClusterStatusInternalServerError The schema is either out of sync (see response body) or the sync check could not be completed.
    77  
    78  swagger:response schemaClusterStatusInternalServerError
    79  */
    80  type SchemaClusterStatusInternalServerError struct {
    81  
    82  	/*
    83  	  In: Body
    84  	*/
    85  	Payload *models.SchemaClusterStatus `json:"body,omitempty"`
    86  }
    87  
    88  // NewSchemaClusterStatusInternalServerError creates SchemaClusterStatusInternalServerError with default headers values
    89  func NewSchemaClusterStatusInternalServerError() *SchemaClusterStatusInternalServerError {
    90  
    91  	return &SchemaClusterStatusInternalServerError{}
    92  }
    93  
    94  // WithPayload adds the payload to the schema cluster status internal server error response
    95  func (o *SchemaClusterStatusInternalServerError) WithPayload(payload *models.SchemaClusterStatus) *SchemaClusterStatusInternalServerError {
    96  	o.Payload = payload
    97  	return o
    98  }
    99  
   100  // SetPayload sets the payload to the schema cluster status internal server error response
   101  func (o *SchemaClusterStatusInternalServerError) SetPayload(payload *models.SchemaClusterStatus) {
   102  	o.Payload = payload
   103  }
   104  
   105  // WriteResponse to the client
   106  func (o *SchemaClusterStatusInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   107  
   108  	rw.WriteHeader(500)
   109  	if o.Payload != nil {
   110  		payload := o.Payload
   111  		if err := producer.Produce(rw, payload); err != nil {
   112  			panic(err) // let the recovery middleware deal with this
   113  		}
   114  	}
   115  }