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