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