github.com/minio/console@v1.4.1/api/operations/object/delete_object_retention_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 object 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 // DeleteObjectRetentionOKCode is the HTTP code returned for type DeleteObjectRetentionOK 34 const DeleteObjectRetentionOKCode int = 200 35 36 /* 37 DeleteObjectRetentionOK A successful response. 38 39 swagger:response deleteObjectRetentionOK 40 */ 41 type DeleteObjectRetentionOK struct { 42 } 43 44 // NewDeleteObjectRetentionOK creates DeleteObjectRetentionOK with default headers values 45 func NewDeleteObjectRetentionOK() *DeleteObjectRetentionOK { 46 47 return &DeleteObjectRetentionOK{} 48 } 49 50 // WriteResponse to the client 51 func (o *DeleteObjectRetentionOK) 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 DeleteObjectRetentionDefault Generic error response. 60 61 swagger:response deleteObjectRetentionDefault 62 */ 63 type DeleteObjectRetentionDefault struct { 64 _statusCode int 65 66 /* 67 In: Body 68 */ 69 Payload *models.APIError `json:"body,omitempty"` 70 } 71 72 // NewDeleteObjectRetentionDefault creates DeleteObjectRetentionDefault with default headers values 73 func NewDeleteObjectRetentionDefault(code int) *DeleteObjectRetentionDefault { 74 if code <= 0 { 75 code = 500 76 } 77 78 return &DeleteObjectRetentionDefault{ 79 _statusCode: code, 80 } 81 } 82 83 // WithStatusCode adds the status to the delete object retention default response 84 func (o *DeleteObjectRetentionDefault) WithStatusCode(code int) *DeleteObjectRetentionDefault { 85 o._statusCode = code 86 return o 87 } 88 89 // SetStatusCode sets the status to the delete object retention default response 90 func (o *DeleteObjectRetentionDefault) SetStatusCode(code int) { 91 o._statusCode = code 92 } 93 94 // WithPayload adds the payload to the delete object retention default response 95 func (o *DeleteObjectRetentionDefault) WithPayload(payload *models.APIError) *DeleteObjectRetentionDefault { 96 o.Payload = payload 97 return o 98 } 99 100 // SetPayload sets the payload to the delete object retention default response 101 func (o *DeleteObjectRetentionDefault) SetPayload(payload *models.APIError) { 102 o.Payload = payload 103 } 104 105 // WriteResponse to the client 106 func (o *DeleteObjectRetentionDefault) 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 }