github.com/kubearmor/cilium@v1.6.12/api/v1/server/restapi/endpoint/delete_endpoint_id_responses.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package endpoint
     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  	models "github.com/cilium/cilium/api/v1/models"
    14  )
    15  
    16  // DeleteEndpointIDOKCode is the HTTP code returned for type DeleteEndpointIDOK
    17  const DeleteEndpointIDOKCode int = 200
    18  
    19  /*DeleteEndpointIDOK Success
    20  
    21  swagger:response deleteEndpointIdOK
    22  */
    23  type DeleteEndpointIDOK struct {
    24  }
    25  
    26  // NewDeleteEndpointIDOK creates DeleteEndpointIDOK with default headers values
    27  func NewDeleteEndpointIDOK() *DeleteEndpointIDOK {
    28  
    29  	return &DeleteEndpointIDOK{}
    30  }
    31  
    32  // WriteResponse to the client
    33  func (o *DeleteEndpointIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    34  
    35  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    36  
    37  	rw.WriteHeader(200)
    38  }
    39  
    40  // DeleteEndpointIDErrorsCode is the HTTP code returned for type DeleteEndpointIDErrors
    41  const DeleteEndpointIDErrorsCode int = 206
    42  
    43  /*DeleteEndpointIDErrors Deleted with a number of errors encountered
    44  
    45  swagger:response deleteEndpointIdErrors
    46  */
    47  type DeleteEndpointIDErrors struct {
    48  
    49  	/*
    50  	  In: Body
    51  	*/
    52  	Payload int64 `json:"body,omitempty"`
    53  }
    54  
    55  // NewDeleteEndpointIDErrors creates DeleteEndpointIDErrors with default headers values
    56  func NewDeleteEndpointIDErrors() *DeleteEndpointIDErrors {
    57  
    58  	return &DeleteEndpointIDErrors{}
    59  }
    60  
    61  // WithPayload adds the payload to the delete endpoint Id errors response
    62  func (o *DeleteEndpointIDErrors) WithPayload(payload int64) *DeleteEndpointIDErrors {
    63  	o.Payload = payload
    64  	return o
    65  }
    66  
    67  // SetPayload sets the payload to the delete endpoint Id errors response
    68  func (o *DeleteEndpointIDErrors) SetPayload(payload int64) {
    69  	o.Payload = payload
    70  }
    71  
    72  // WriteResponse to the client
    73  func (o *DeleteEndpointIDErrors) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    74  
    75  	rw.WriteHeader(206)
    76  	payload := o.Payload
    77  	if err := producer.Produce(rw, payload); err != nil {
    78  		panic(err) // let the recovery middleware deal with this
    79  	}
    80  }
    81  
    82  // DeleteEndpointIDInvalidCode is the HTTP code returned for type DeleteEndpointIDInvalid
    83  const DeleteEndpointIDInvalidCode int = 400
    84  
    85  /*DeleteEndpointIDInvalid Invalid endpoint ID format for specified type. Details in error
    86  message
    87  
    88  
    89  swagger:response deleteEndpointIdInvalid
    90  */
    91  type DeleteEndpointIDInvalid struct {
    92  
    93  	/*
    94  	  In: Body
    95  	*/
    96  	Payload models.Error `json:"body,omitempty"`
    97  }
    98  
    99  // NewDeleteEndpointIDInvalid creates DeleteEndpointIDInvalid with default headers values
   100  func NewDeleteEndpointIDInvalid() *DeleteEndpointIDInvalid {
   101  
   102  	return &DeleteEndpointIDInvalid{}
   103  }
   104  
   105  // WithPayload adds the payload to the delete endpoint Id invalid response
   106  func (o *DeleteEndpointIDInvalid) WithPayload(payload models.Error) *DeleteEndpointIDInvalid {
   107  	o.Payload = payload
   108  	return o
   109  }
   110  
   111  // SetPayload sets the payload to the delete endpoint Id invalid response
   112  func (o *DeleteEndpointIDInvalid) SetPayload(payload models.Error) {
   113  	o.Payload = payload
   114  }
   115  
   116  // WriteResponse to the client
   117  func (o *DeleteEndpointIDInvalid) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   118  
   119  	rw.WriteHeader(400)
   120  	payload := o.Payload
   121  	if err := producer.Produce(rw, payload); err != nil {
   122  		panic(err) // let the recovery middleware deal with this
   123  	}
   124  }
   125  
   126  // DeleteEndpointIDNotFoundCode is the HTTP code returned for type DeleteEndpointIDNotFound
   127  const DeleteEndpointIDNotFoundCode int = 404
   128  
   129  /*DeleteEndpointIDNotFound Endpoint not found
   130  
   131  swagger:response deleteEndpointIdNotFound
   132  */
   133  type DeleteEndpointIDNotFound struct {
   134  }
   135  
   136  // NewDeleteEndpointIDNotFound creates DeleteEndpointIDNotFound with default headers values
   137  func NewDeleteEndpointIDNotFound() *DeleteEndpointIDNotFound {
   138  
   139  	return &DeleteEndpointIDNotFound{}
   140  }
   141  
   142  // WriteResponse to the client
   143  func (o *DeleteEndpointIDNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   144  
   145  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
   146  
   147  	rw.WriteHeader(404)
   148  }