X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fclientapi%2Freport%2Fsubscribe_report_parameters.go;fp=pkg%2Fclientapi%2Freport%2Fsubscribe_report_parameters.go;h=dad7e45314e696fa2ae9ef5e19c222ee48f9bbeb;hb=3895a8c8775ef96652e6473414fdd7366c59f404;hp=0000000000000000000000000000000000000000;hpb=5120ec103eead26427b977f4b2456c2ce57b36ac;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/clientapi/report/subscribe_report_parameters.go b/pkg/clientapi/report/subscribe_report_parameters.go new file mode 100644 index 0000000..dad7e45 --- /dev/null +++ b/pkg/clientapi/report/subscribe_report_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package report + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" + + clientmodel "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientmodel" +) + +// NewSubscribeReportParams creates a new SubscribeReportParams object +// with the default values initialized. +func NewSubscribeReportParams() *SubscribeReportParams { + var () + return &SubscribeReportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewSubscribeReportParamsWithTimeout creates a new SubscribeReportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSubscribeReportParamsWithTimeout(timeout time.Duration) *SubscribeReportParams { + var () + return &SubscribeReportParams{ + + timeout: timeout, + } +} + +// NewSubscribeReportParamsWithContext creates a new SubscribeReportParams object +// with the default values initialized, and the ability to set a context for a request +func NewSubscribeReportParamsWithContext(ctx context.Context) *SubscribeReportParams { + var () + return &SubscribeReportParams{ + + Context: ctx, + } +} + +// NewSubscribeReportParamsWithHTTPClient creates a new SubscribeReportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSubscribeReportParamsWithHTTPClient(client *http.Client) *SubscribeReportParams { + var () + return &SubscribeReportParams{ + HTTPClient: client, + } +} + +/*SubscribeReportParams contains all the parameters to send to the API endpoint +for the subscribe report operation typically these are written to a http.Request +*/ +type SubscribeReportParams struct { + + /*ReportParams + Subscription report parameters + + */ + ReportParams *clientmodel.ReportParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the subscribe report params +func (o *SubscribeReportParams) WithTimeout(timeout time.Duration) *SubscribeReportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the subscribe report params +func (o *SubscribeReportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the subscribe report params +func (o *SubscribeReportParams) WithContext(ctx context.Context) *SubscribeReportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the subscribe report params +func (o *SubscribeReportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the subscribe report params +func (o *SubscribeReportParams) WithHTTPClient(client *http.Client) *SubscribeReportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the subscribe report params +func (o *SubscribeReportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithReportParams adds the reportParams to the subscribe report params +func (o *SubscribeReportParams) WithReportParams(reportParams *clientmodel.ReportParams) *SubscribeReportParams { + o.SetReportParams(reportParams) + return o +} + +// SetReportParams adds the reportParams to the subscribe report params +func (o *SubscribeReportParams) SetReportParams(reportParams *clientmodel.ReportParams) { + o.ReportParams = reportParams +} + +// WriteToRequest writes these params to a swagger request +func (o *SubscribeReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ReportParams != nil { + if err := r.SetBodyParam(o.ReportParams); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +}