1 // Code generated by go-swagger; DO NOT EDIT.
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the swagger generate command
11 "github.com/go-openapi/errors"
12 "github.com/go-openapi/runtime"
13 "github.com/go-openapi/runtime/middleware"
15 models "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/models"
18 // NewSubscribeReportParams creates a new SubscribeReportParams object
19 // no default values defined in spec.
20 func NewSubscribeReportParams() SubscribeReportParams {
22 return SubscribeReportParams{}
25 // SubscribeReportParams contains all the bound params for the subscribe report operation
26 // typically these are obtained from a http.Request
28 // swagger:parameters subscribeReport
29 type SubscribeReportParams struct {
31 // HTTP Request Object
32 HTTPRequest *http.Request `json:"-"`
34 /*Subscription report parameters
37 ReportParams *models.ReportParams
40 // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
41 // for simple values it will use straight method calls.
43 // To ensure default values, the struct must have been initialized with NewSubscribeReportParams() beforehand.
44 func (o *SubscribeReportParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
49 if runtime.HasBody(r) {
51 var body models.ReportParams
52 if err := route.Consumer.Consume(r.Body, &body); err != nil {
53 res = append(res, errors.NewParseError("reportParams", "body", "", err))
55 // validate body object
56 if err := body.Validate(route.Formats); err != nil {
57 res = append(res, err)
61 o.ReportParams = &body
66 return errors.CompositeValidationError(res...)