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

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package policy
     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  // DeleteFqdnCacheOKCode is the HTTP code returned for type DeleteFqdnCacheOK
    17  const DeleteFqdnCacheOKCode int = 200
    18  
    19  /*DeleteFqdnCacheOK Success
    20  
    21  swagger:response deleteFqdnCacheOK
    22  */
    23  type DeleteFqdnCacheOK struct {
    24  }
    25  
    26  // NewDeleteFqdnCacheOK creates DeleteFqdnCacheOK with default headers values
    27  func NewDeleteFqdnCacheOK() *DeleteFqdnCacheOK {
    28  
    29  	return &DeleteFqdnCacheOK{}
    30  }
    31  
    32  // WriteResponse to the client
    33  func (o *DeleteFqdnCacheOK) 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  // DeleteFqdnCacheBadRequestCode is the HTTP code returned for type DeleteFqdnCacheBadRequest
    41  const DeleteFqdnCacheBadRequestCode int = 400
    42  
    43  /*DeleteFqdnCacheBadRequest Invalid request (error parsing parameters)
    44  
    45  swagger:response deleteFqdnCacheBadRequest
    46  */
    47  type DeleteFqdnCacheBadRequest struct {
    48  
    49  	/*
    50  	  In: Body
    51  	*/
    52  	Payload models.Error `json:"body,omitempty"`
    53  }
    54  
    55  // NewDeleteFqdnCacheBadRequest creates DeleteFqdnCacheBadRequest with default headers values
    56  func NewDeleteFqdnCacheBadRequest() *DeleteFqdnCacheBadRequest {
    57  
    58  	return &DeleteFqdnCacheBadRequest{}
    59  }
    60  
    61  // WithPayload adds the payload to the delete fqdn cache bad request response
    62  func (o *DeleteFqdnCacheBadRequest) WithPayload(payload models.Error) *DeleteFqdnCacheBadRequest {
    63  	o.Payload = payload
    64  	return o
    65  }
    66  
    67  // SetPayload sets the payload to the delete fqdn cache bad request response
    68  func (o *DeleteFqdnCacheBadRequest) SetPayload(payload models.Error) {
    69  	o.Payload = payload
    70  }
    71  
    72  // WriteResponse to the client
    73  func (o *DeleteFqdnCacheBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    74  
    75  	rw.WriteHeader(400)
    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  }