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