github.com/minio/console@v1.4.1/api/operations/k_m_s/k_m_s_delete_policy_responses.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 // This file is part of MinIO Console Server 4 // Copyright (c) 2023 MinIO, Inc. 5 // 6 // This program is free software: you can redistribute it and/or modify 7 // it under the terms of the GNU Affero General Public License as published by 8 // the Free Software Foundation, either version 3 of the License, or 9 // (at your option) any later version. 10 // 11 // This program is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 // GNU Affero General Public License for more details. 15 // 16 // You should have received a copy of the GNU Affero General Public License 17 // along with this program. If not, see <http://www.gnu.org/licenses/>. 18 // 19 20 package k_m_s 21 22 // This file was generated by the swagger tool. 23 // Editing this file might prove futile when you re-run the swagger generate command 24 25 import ( 26 "net/http" 27 28 "github.com/go-openapi/runtime" 29 30 "github.com/minio/console/models" 31 ) 32 33 // KMSDeletePolicyOKCode is the HTTP code returned for type KMSDeletePolicyOK 34 const KMSDeletePolicyOKCode int = 200 35 36 /* 37 KMSDeletePolicyOK A successful response. 38 39 swagger:response kMSDeletePolicyOK 40 */ 41 type KMSDeletePolicyOK struct { 42 } 43 44 // NewKMSDeletePolicyOK creates KMSDeletePolicyOK with default headers values 45 func NewKMSDeletePolicyOK() *KMSDeletePolicyOK { 46 47 return &KMSDeletePolicyOK{} 48 } 49 50 // WriteResponse to the client 51 func (o *KMSDeletePolicyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 52 53 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 54 55 rw.WriteHeader(200) 56 } 57 58 /* 59 KMSDeletePolicyDefault Generic error response. 60 61 swagger:response kMSDeletePolicyDefault 62 */ 63 type KMSDeletePolicyDefault struct { 64 _statusCode int 65 66 /* 67 In: Body 68 */ 69 Payload *models.APIError `json:"body,omitempty"` 70 } 71 72 // NewKMSDeletePolicyDefault creates KMSDeletePolicyDefault with default headers values 73 func NewKMSDeletePolicyDefault(code int) *KMSDeletePolicyDefault { 74 if code <= 0 { 75 code = 500 76 } 77 78 return &KMSDeletePolicyDefault{ 79 _statusCode: code, 80 } 81 } 82 83 // WithStatusCode adds the status to the k m s delete policy default response 84 func (o *KMSDeletePolicyDefault) WithStatusCode(code int) *KMSDeletePolicyDefault { 85 o._statusCode = code 86 return o 87 } 88 89 // SetStatusCode sets the status to the k m s delete policy default response 90 func (o *KMSDeletePolicyDefault) SetStatusCode(code int) { 91 o._statusCode = code 92 } 93 94 // WithPayload adds the payload to the k m s delete policy default response 95 func (o *KMSDeletePolicyDefault) WithPayload(payload *models.APIError) *KMSDeletePolicyDefault { 96 o.Payload = payload 97 return o 98 } 99 100 // SetPayload sets the payload to the k m s delete policy default response 101 func (o *KMSDeletePolicyDefault) SetPayload(payload *models.APIError) { 102 o.Payload = payload 103 } 104 105 // WriteResponse to the client 106 func (o *KMSDeletePolicyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 107 108 rw.WriteHeader(o._statusCode) 109 if o.Payload != nil { 110 payload := o.Payload 111 if err := producer.Produce(rw, payload); err != nil { 112 panic(err) // let the recovery middleware deal with this 113 } 114 } 115 }