github.com/Bio-core/jtree@v0.0.0-20190705165106-1d7a7e7d6272/restapi/operations/add_resultdetails_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  // AddResultdetailsOKCode is the HTTP code returned for type AddResultdetailsOK
    15  const AddResultdetailsOKCode int = 200
    16  
    17  /*AddResultdetailsOK id
    18  
    19  swagger:response addResultdetailsOK
    20  */
    21  type AddResultdetailsOK struct {
    22  
    23  	/*
    24  	  In: Body
    25  	*/
    26  	Payload string `json:"body,omitempty"`
    27  }
    28  
    29  // NewAddResultdetailsOK creates AddResultdetailsOK with default headers values
    30  func NewAddResultdetailsOK() *AddResultdetailsOK {
    31  	return &AddResultdetailsOK{}
    32  }
    33  
    34  // WithPayload adds the payload to the add resultdetails o k response
    35  func (o *AddResultdetailsOK) WithPayload(payload string) *AddResultdetailsOK {
    36  	o.Payload = payload
    37  	return o
    38  }
    39  
    40  // SetPayload sets the payload to the add resultdetails o k response
    41  func (o *AddResultdetailsOK) SetPayload(payload string) {
    42  	o.Payload = payload
    43  }
    44  
    45  // WriteResponse to the client
    46  func (o *AddResultdetailsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    47  
    48  	rw.WriteHeader(200)
    49  	payload := o.Payload
    50  	if err := producer.Produce(rw, payload); err != nil {
    51  		panic(err) // let the recovery middleware deal with this
    52  	}
    53  
    54  }
    55  
    56  // AddResultdetailsBadRequestCode is the HTTP code returned for type AddResultdetailsBadRequest
    57  const AddResultdetailsBadRequestCode int = 400
    58  
    59  /*AddResultdetailsBadRequest invalid input, object invalid
    60  
    61  swagger:response addResultdetailsBadRequest
    62  */
    63  type AddResultdetailsBadRequest struct {
    64  }
    65  
    66  // NewAddResultdetailsBadRequest creates AddResultdetailsBadRequest with default headers values
    67  func NewAddResultdetailsBadRequest() *AddResultdetailsBadRequest {
    68  	return &AddResultdetailsBadRequest{}
    69  }
    70  
    71  // WriteResponse to the client
    72  func (o *AddResultdetailsBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    73  
    74  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    75  
    76  	rw.WriteHeader(400)
    77  }
    78  
    79  // AddResultdetailsConflictCode is the HTTP code returned for type AddResultdetailsConflict
    80  const AddResultdetailsConflictCode int = 409
    81  
    82  /*AddResultdetailsConflict an existing item already exists
    83  
    84  swagger:response addResultdetailsConflict
    85  */
    86  type AddResultdetailsConflict struct {
    87  }
    88  
    89  // NewAddResultdetailsConflict creates AddResultdetailsConflict with default headers values
    90  func NewAddResultdetailsConflict() *AddResultdetailsConflict {
    91  	return &AddResultdetailsConflict{}
    92  }
    93  
    94  // WriteResponse to the client
    95  func (o *AddResultdetailsConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    96  
    97  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    98  
    99  	rw.WriteHeader(409)
   100  }