1 // Code generated by go-swagger; DO NOT EDIT. 2 3 // Copyright Prometheus Team 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 // 16 17 package receiver 18 19 // This file was generated by the swagger tool. 20 // Editing this file might prove futile when you re-run the swagger generate command 21 22 import ( 23 "net/http" 24 25 "github.com/go-openapi/errors" 26 "github.com/go-openapi/runtime/middleware" 27 ) 28 29 // NewGetReceiversParams creates a new GetReceiversParams object 30 // 31 // There are no default values defined in the spec. 32 func NewGetReceiversParams() GetReceiversParams { 33 34 return GetReceiversParams{} 35 } 36 37 // GetReceiversParams contains all the bound params for the get receivers operation 38 // typically these are obtained from a http.Request 39 // 40 // swagger:parameters getReceivers 41 type GetReceiversParams struct { 42 43 // HTTP Request Object 44 HTTPRequest *http.Request `json:"-"` 45 } 46 47 // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface 48 // for simple values it will use straight method calls. 49 // 50 // To ensure default values, the struct must have been initialized with NewGetReceiversParams() beforehand. 51 func (o *GetReceiversParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { 52 var res []error 53 54 o.HTTPRequest = r 55 56 if len(res) > 0 { 57 return errors.CompositeValidationError(res...) 58 } 59 return nil 60 } 61