1 // Code generated by go-swagger; DO NOT EDIT. 2 3 // Copyright Prometheus Team 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 // 16 17 package silence 18 19 // This file was generated by the swagger tool. 20 // Editing this file might prove futile when you re-run the swagger generate command 21 22 import ( 23 "net/http" 24 25 "github.com/go-openapi/runtime" 26 ) 27 28 // DeleteSilenceOKCode is the HTTP code returned for type DeleteSilenceOK 29 const DeleteSilenceOKCode int = 200 30 31 /* 32 DeleteSilenceOK Delete silence response 33 34 swagger:response deleteSilenceOK 35 */ 36 type DeleteSilenceOK struct { 37 } 38 39 // NewDeleteSilenceOK creates DeleteSilenceOK with default headers values 40 func NewDeleteSilenceOK() *DeleteSilenceOK { 41 42 return &DeleteSilenceOK{} 43 } 44 45 // WriteResponse to the client 46 func (o *DeleteSilenceOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 47 48 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 49 50 rw.WriteHeader(200) 51 } 52 53 // DeleteSilenceInternalServerErrorCode is the HTTP code returned for type DeleteSilenceInternalServerError 54 const DeleteSilenceInternalServerErrorCode int = 500 55 56 /* 57 DeleteSilenceInternalServerError Internal server error 58 59 swagger:response deleteSilenceInternalServerError 60 */ 61 type DeleteSilenceInternalServerError struct { 62 63 /* 64 In: Body 65 */ 66 Payload string `json:"body,omitempty"` 67 } 68 69 // NewDeleteSilenceInternalServerError creates DeleteSilenceInternalServerError with default headers values 70 func NewDeleteSilenceInternalServerError() *DeleteSilenceInternalServerError { 71 72 return &DeleteSilenceInternalServerError{} 73 } 74 75 // WithPayload adds the payload to the delete silence internal server error response 76 func (o *DeleteSilenceInternalServerError) WithPayload(payload string) *DeleteSilenceInternalServerError { 77 o.Payload = payload 78 return o 79 } 80 81 // SetPayload sets the payload to the delete silence internal server error response 82 func (o *DeleteSilenceInternalServerError) SetPayload(payload string) { 83 o.Payload = payload 84 } 85 86 // WriteResponse to the client 87 func (o *DeleteSilenceInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 88 89 rw.WriteHeader(500) 90 payload := o.Payload 91 if err := producer.Produce(rw, payload); err != nil { 92 panic(err) // let the recovery middleware deal with this 93 } 94 } 95