github.com/cilium/cilium@v1.16.2/api/v1/server/restapi/daemon/get_map_name_events_responses.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  // Copyright Authors of Cilium
     4  // SPDX-License-Identifier: Apache-2.0
     5  
     6  package daemon
     7  
     8  // This file was generated by the swagger tool.
     9  // Editing this file might prove futile when you re-run the swagger generate command
    10  
    11  import (
    12  	"io"
    13  	"net/http"
    14  
    15  	"github.com/go-openapi/runtime"
    16  )
    17  
    18  // GetMapNameEventsOKCode is the HTTP code returned for type GetMapNameEventsOK
    19  const GetMapNameEventsOKCode int = 200
    20  
    21  /*
    22  GetMapNameEventsOK Success
    23  
    24  swagger:response getMapNameEventsOK
    25  */
    26  type GetMapNameEventsOK struct {
    27  
    28  	/*
    29  	  In: Body
    30  	*/
    31  	Payload io.ReadCloser `json:"body,omitempty"`
    32  }
    33  
    34  // NewGetMapNameEventsOK creates GetMapNameEventsOK with default headers values
    35  func NewGetMapNameEventsOK() *GetMapNameEventsOK {
    36  
    37  	return &GetMapNameEventsOK{}
    38  }
    39  
    40  // WithPayload adds the payload to the get map name events o k response
    41  func (o *GetMapNameEventsOK) WithPayload(payload io.ReadCloser) *GetMapNameEventsOK {
    42  	o.Payload = payload
    43  	return o
    44  }
    45  
    46  // SetPayload sets the payload to the get map name events o k response
    47  func (o *GetMapNameEventsOK) SetPayload(payload io.ReadCloser) {
    48  	o.Payload = payload
    49  }
    50  
    51  // WriteResponse to the client
    52  func (o *GetMapNameEventsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    53  
    54  	rw.WriteHeader(200)
    55  	payload := o.Payload
    56  	if err := producer.Produce(rw, payload); err != nil {
    57  		panic(err) // let the recovery middleware deal with this
    58  	}
    59  }
    60  
    61  // GetMapNameEventsNotFoundCode is the HTTP code returned for type GetMapNameEventsNotFound
    62  const GetMapNameEventsNotFoundCode int = 404
    63  
    64  /*
    65  GetMapNameEventsNotFound Map not found
    66  
    67  swagger:response getMapNameEventsNotFound
    68  */
    69  type GetMapNameEventsNotFound struct {
    70  }
    71  
    72  // NewGetMapNameEventsNotFound creates GetMapNameEventsNotFound with default headers values
    73  func NewGetMapNameEventsNotFound() *GetMapNameEventsNotFound {
    74  
    75  	return &GetMapNameEventsNotFound{}
    76  }
    77  
    78  // WriteResponse to the client
    79  func (o *GetMapNameEventsNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    80  
    81  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    82  
    83  	rw.WriteHeader(404)
    84  }