github.com/minio/console@v1.4.1/api/operations/object/download_multiple_objects_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 "io" 27 "net/http" 28 29 "github.com/go-openapi/runtime" 30 31 "github.com/minio/console/models" 32 ) 33 34 // DownloadMultipleObjectsOKCode is the HTTP code returned for type DownloadMultipleObjectsOK 35 const DownloadMultipleObjectsOKCode int = 200 36 37 /* 38 DownloadMultipleObjectsOK A successful response. 39 40 swagger:response downloadMultipleObjectsOK 41 */ 42 type DownloadMultipleObjectsOK struct { 43 44 /* 45 In: Body 46 */ 47 Payload io.ReadCloser `json:"body,omitempty"` 48 } 49 50 // NewDownloadMultipleObjectsOK creates DownloadMultipleObjectsOK with default headers values 51 func NewDownloadMultipleObjectsOK() *DownloadMultipleObjectsOK { 52 53 return &DownloadMultipleObjectsOK{} 54 } 55 56 // WithPayload adds the payload to the download multiple objects o k response 57 func (o *DownloadMultipleObjectsOK) WithPayload(payload io.ReadCloser) *DownloadMultipleObjectsOK { 58 o.Payload = payload 59 return o 60 } 61 62 // SetPayload sets the payload to the download multiple objects o k response 63 func (o *DownloadMultipleObjectsOK) SetPayload(payload io.ReadCloser) { 64 o.Payload = payload 65 } 66 67 // WriteResponse to the client 68 func (o *DownloadMultipleObjectsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 69 70 rw.WriteHeader(200) 71 payload := o.Payload 72 if err := producer.Produce(rw, payload); err != nil { 73 panic(err) // let the recovery middleware deal with this 74 } 75 } 76 77 /* 78 DownloadMultipleObjectsDefault Generic error response. 79 80 swagger:response downloadMultipleObjectsDefault 81 */ 82 type DownloadMultipleObjectsDefault struct { 83 _statusCode int 84 85 /* 86 In: Body 87 */ 88 Payload *models.APIError `json:"body,omitempty"` 89 } 90 91 // NewDownloadMultipleObjectsDefault creates DownloadMultipleObjectsDefault with default headers values 92 func NewDownloadMultipleObjectsDefault(code int) *DownloadMultipleObjectsDefault { 93 if code <= 0 { 94 code = 500 95 } 96 97 return &DownloadMultipleObjectsDefault{ 98 _statusCode: code, 99 } 100 } 101 102 // WithStatusCode adds the status to the download multiple objects default response 103 func (o *DownloadMultipleObjectsDefault) WithStatusCode(code int) *DownloadMultipleObjectsDefault { 104 o._statusCode = code 105 return o 106 } 107 108 // SetStatusCode sets the status to the download multiple objects default response 109 func (o *DownloadMultipleObjectsDefault) SetStatusCode(code int) { 110 o._statusCode = code 111 } 112 113 // WithPayload adds the payload to the download multiple objects default response 114 func (o *DownloadMultipleObjectsDefault) WithPayload(payload *models.APIError) *DownloadMultipleObjectsDefault { 115 o.Payload = payload 116 return o 117 } 118 119 // SetPayload sets the payload to the download multiple objects default response 120 func (o *DownloadMultipleObjectsDefault) SetPayload(payload *models.APIError) { 121 o.Payload = payload 122 } 123 124 // WriteResponse to the client 125 func (o *DownloadMultipleObjectsDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 126 127 rw.WriteHeader(o._statusCode) 128 if o.Payload != nil { 129 payload := o.Payload 130 if err := producer.Produce(rw, payload); err != nil { 131 panic(err) // let the recovery middleware deal with this 132 } 133 } 134 }