github.com/kubearmor/cilium@v1.6.12/api/v1/server/restapi/service/get_service_id_responses.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package service 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 // GetServiceIDOKCode is the HTTP code returned for type GetServiceIDOK 17 const GetServiceIDOKCode int = 200 18 19 /*GetServiceIDOK Success 20 21 swagger:response getServiceIdOK 22 */ 23 type GetServiceIDOK struct { 24 25 /* 26 In: Body 27 */ 28 Payload *models.Service `json:"body,omitempty"` 29 } 30 31 // NewGetServiceIDOK creates GetServiceIDOK with default headers values 32 func NewGetServiceIDOK() *GetServiceIDOK { 33 34 return &GetServiceIDOK{} 35 } 36 37 // WithPayload adds the payload to the get service Id o k response 38 func (o *GetServiceIDOK) WithPayload(payload *models.Service) *GetServiceIDOK { 39 o.Payload = payload 40 return o 41 } 42 43 // SetPayload sets the payload to the get service Id o k response 44 func (o *GetServiceIDOK) SetPayload(payload *models.Service) { 45 o.Payload = payload 46 } 47 48 // WriteResponse to the client 49 func (o *GetServiceIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 50 51 rw.WriteHeader(200) 52 if o.Payload != nil { 53 payload := o.Payload 54 if err := producer.Produce(rw, payload); err != nil { 55 panic(err) // let the recovery middleware deal with this 56 } 57 } 58 } 59 60 // GetServiceIDNotFoundCode is the HTTP code returned for type GetServiceIDNotFound 61 const GetServiceIDNotFoundCode int = 404 62 63 /*GetServiceIDNotFound Service not found 64 65 swagger:response getServiceIdNotFound 66 */ 67 type GetServiceIDNotFound struct { 68 } 69 70 // NewGetServiceIDNotFound creates GetServiceIDNotFound with default headers values 71 func NewGetServiceIDNotFound() *GetServiceIDNotFound { 72 73 return &GetServiceIDNotFound{} 74 } 75 76 // WriteResponse to the client 77 func (o *GetServiceIDNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 78 79 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 80 81 rw.WriteHeader(404) 82 }