github.com/cilium/cilium@v1.16.2/api/v1/server/restapi/policy/delete_fqdn_cache_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 policy 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 "net/http" 13 14 "github.com/go-openapi/runtime" 15 16 "github.com/cilium/cilium/api/v1/models" 17 ) 18 19 // DeleteFqdnCacheOKCode is the HTTP code returned for type DeleteFqdnCacheOK 20 const DeleteFqdnCacheOKCode int = 200 21 22 /* 23 DeleteFqdnCacheOK Success 24 25 swagger:response deleteFqdnCacheOK 26 */ 27 type DeleteFqdnCacheOK struct { 28 } 29 30 // NewDeleteFqdnCacheOK creates DeleteFqdnCacheOK with default headers values 31 func NewDeleteFqdnCacheOK() *DeleteFqdnCacheOK { 32 33 return &DeleteFqdnCacheOK{} 34 } 35 36 // WriteResponse to the client 37 func (o *DeleteFqdnCacheOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 38 39 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 40 41 rw.WriteHeader(200) 42 } 43 44 // DeleteFqdnCacheBadRequestCode is the HTTP code returned for type DeleteFqdnCacheBadRequest 45 const DeleteFqdnCacheBadRequestCode int = 400 46 47 /* 48 DeleteFqdnCacheBadRequest Invalid request (error parsing parameters) 49 50 swagger:response deleteFqdnCacheBadRequest 51 */ 52 type DeleteFqdnCacheBadRequest struct { 53 54 /* 55 In: Body 56 */ 57 Payload models.Error `json:"body,omitempty"` 58 } 59 60 // NewDeleteFqdnCacheBadRequest creates DeleteFqdnCacheBadRequest with default headers values 61 func NewDeleteFqdnCacheBadRequest() *DeleteFqdnCacheBadRequest { 62 63 return &DeleteFqdnCacheBadRequest{} 64 } 65 66 // WithPayload adds the payload to the delete fqdn cache bad request response 67 func (o *DeleteFqdnCacheBadRequest) WithPayload(payload models.Error) *DeleteFqdnCacheBadRequest { 68 o.Payload = payload 69 return o 70 } 71 72 // SetPayload sets the payload to the delete fqdn cache bad request response 73 func (o *DeleteFqdnCacheBadRequest) SetPayload(payload models.Error) { 74 o.Payload = payload 75 } 76 77 // WriteResponse to the client 78 func (o *DeleteFqdnCacheBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 79 80 rw.WriteHeader(400) 81 payload := o.Payload 82 if err := producer.Produce(rw, payload); err != nil { 83 panic(err) // let the recovery middleware deal with this 84 } 85 } 86 87 // DeleteFqdnCacheForbiddenCode is the HTTP code returned for type DeleteFqdnCacheForbidden 88 const DeleteFqdnCacheForbiddenCode int = 403 89 90 /* 91 DeleteFqdnCacheForbidden Forbidden 92 93 swagger:response deleteFqdnCacheForbidden 94 */ 95 type DeleteFqdnCacheForbidden struct { 96 } 97 98 // NewDeleteFqdnCacheForbidden creates DeleteFqdnCacheForbidden with default headers values 99 func NewDeleteFqdnCacheForbidden() *DeleteFqdnCacheForbidden { 100 101 return &DeleteFqdnCacheForbidden{} 102 } 103 104 // WriteResponse to the client 105 func (o *DeleteFqdnCacheForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 106 107 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 108 109 rw.WriteHeader(403) 110 }