github.com/Bio-core/jtree@v0.0.0-20190705165106-1d7a7e7d6272/restapi/operations/get_uneditable_responses.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package operations
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	"net/http"
    10  
    11  	"github.com/go-openapi/runtime"
    12  )
    13  
    14  // GetUneditableOKCode is the HTTP code returned for type GetUneditableOK
    15  const GetUneditableOKCode int = 200
    16  
    17  /*GetUneditableOK columns
    18  
    19  swagger:response getUneditableOK
    20  */
    21  type GetUneditableOK struct {
    22  
    23  	/*
    24  	  In: Body
    25  	*/
    26  	Payload []string `json:"body,omitempty"`
    27  }
    28  
    29  // NewGetUneditableOK creates GetUneditableOK with default headers values
    30  func NewGetUneditableOK() *GetUneditableOK {
    31  	return &GetUneditableOK{}
    32  }
    33  
    34  // WithPayload adds the payload to the get uneditable o k response
    35  func (o *GetUneditableOK) WithPayload(payload []string) *GetUneditableOK {
    36  	o.Payload = payload
    37  	return o
    38  }
    39  
    40  // SetPayload sets the payload to the get uneditable o k response
    41  func (o *GetUneditableOK) SetPayload(payload []string) {
    42  	o.Payload = payload
    43  }
    44  
    45  // WriteResponse to the client
    46  func (o *GetUneditableOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    47  
    48  	rw.WriteHeader(200)
    49  	payload := o.Payload
    50  	if payload == nil {
    51  		payload = make([]string, 0, 50)
    52  	}
    53  
    54  	if err := producer.Produce(rw, payload); err != nil {
    55  		panic(err) // let the recovery middleware deal with this
    56  	}
    57  
    58  }
    59  
    60  // GetUneditableBadRequestCode is the HTTP code returned for type GetUneditableBadRequest
    61  const GetUneditableBadRequestCode int = 400
    62  
    63  /*GetUneditableBadRequest bad input parameter
    64  
    65  swagger:response getUneditableBadRequest
    66  */
    67  type GetUneditableBadRequest struct {
    68  }
    69  
    70  // NewGetUneditableBadRequest creates GetUneditableBadRequest with default headers values
    71  func NewGetUneditableBadRequest() *GetUneditableBadRequest {
    72  	return &GetUneditableBadRequest{}
    73  }
    74  
    75  // WriteResponse to the client
    76  func (o *GetUneditableBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    77  
    78  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    79  
    80  	rw.WriteHeader(400)
    81  }