github.com/minio/console@v1.4.1/api/operations/k_m_s/k_m_s_version_parameters.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 k_m_s
    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/errors"
    29  	"github.com/go-openapi/runtime/middleware"
    30  )
    31  
    32  // NewKMSVersionParams creates a new KMSVersionParams object
    33  //
    34  // There are no default values defined in the spec.
    35  func NewKMSVersionParams() KMSVersionParams {
    36  
    37  	return KMSVersionParams{}
    38  }
    39  
    40  // KMSVersionParams contains all the bound params for the k m s version operation
    41  // typically these are obtained from a http.Request
    42  //
    43  // swagger:parameters KMSVersion
    44  type KMSVersionParams struct {
    45  
    46  	// HTTP Request Object
    47  	HTTPRequest *http.Request `json:"-"`
    48  }
    49  
    50  // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
    51  // for simple values it will use straight method calls.
    52  //
    53  // To ensure default values, the struct must have been initialized with NewKMSVersionParams() beforehand.
    54  func (o *KMSVersionParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
    55  	var res []error
    56  
    57  	o.HTTPRequest = r
    58  
    59  	if len(res) > 0 {
    60  		return errors.CompositeValidationError(res...)
    61  	}
    62  	return nil
    63  }