github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/weaviate_root_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 operations
    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  
    25  // WeaviateRootOKCode is the HTTP code returned for type WeaviateRootOK
    26  const WeaviateRootOKCode int = 200
    27  
    28  /*
    29  WeaviateRootOK Weaviate is alive and ready to serve content
    30  
    31  swagger:response weaviateRootOK
    32  */
    33  type WeaviateRootOK struct {
    34  
    35  	/*
    36  	  In: Body
    37  	*/
    38  	Payload *WeaviateRootOKBody `json:"body,omitempty"`
    39  }
    40  
    41  // NewWeaviateRootOK creates WeaviateRootOK with default headers values
    42  func NewWeaviateRootOK() *WeaviateRootOK {
    43  
    44  	return &WeaviateRootOK{}
    45  }
    46  
    47  // WithPayload adds the payload to the weaviate root o k response
    48  func (o *WeaviateRootOK) WithPayload(payload *WeaviateRootOKBody) *WeaviateRootOK {
    49  	o.Payload = payload
    50  	return o
    51  }
    52  
    53  // SetPayload sets the payload to the weaviate root o k response
    54  func (o *WeaviateRootOK) SetPayload(payload *WeaviateRootOKBody) {
    55  	o.Payload = payload
    56  }
    57  
    58  // WriteResponse to the client
    59  func (o *WeaviateRootOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    60  
    61  	rw.WriteHeader(200)
    62  	if o.Payload != nil {
    63  		payload := o.Payload
    64  		if err := producer.Produce(rw, payload); err != nil {
    65  			panic(err) // let the recovery middleware deal with this
    66  		}
    67  	}
    68  }