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
13 "github.com/go-openapi/errors"
14 "github.com/go-openapi/runtime"
15 cr "github.com/go-openapi/runtime/client"
17 strfmt "github.com/go-openapi/strfmt"
19 clientmodel "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientmodel"
22 // NewSubscribeControlParams creates a new SubscribeControlParams object
23 // with the default values initialized.
24 func NewSubscribeControlParams() *SubscribeControlParams {
26 return &SubscribeControlParams{
28 timeout: cr.DefaultTimeout,
32 // NewSubscribeControlParamsWithTimeout creates a new SubscribeControlParams object
33 // with the default values initialized, and the ability to set a timeout on a request
34 func NewSubscribeControlParamsWithTimeout(timeout time.Duration) *SubscribeControlParams {
36 return &SubscribeControlParams{
42 // NewSubscribeControlParamsWithContext creates a new SubscribeControlParams object
43 // with the default values initialized, and the ability to set a context for a request
44 func NewSubscribeControlParamsWithContext(ctx context.Context) *SubscribeControlParams {
46 return &SubscribeControlParams{
52 // NewSubscribeControlParamsWithHTTPClient creates a new SubscribeControlParams object
53 // with the default values initialized, and the ability to set a custom HTTPClient for a request
54 func NewSubscribeControlParamsWithHTTPClient(client *http.Client) *SubscribeControlParams {
56 return &SubscribeControlParams{
61 /*SubscribeControlParams contains all the parameters to send to the API endpoint
62 for the subscribe control operation typically these are written to a http.Request
64 type SubscribeControlParams struct {
67 Subscription control parameters
70 ControlParams *clientmodel.ControlParams
73 Context context.Context
74 HTTPClient *http.Client
77 // WithTimeout adds the timeout to the subscribe control params
78 func (o *SubscribeControlParams) WithTimeout(timeout time.Duration) *SubscribeControlParams {
83 // SetTimeout adds the timeout to the subscribe control params
84 func (o *SubscribeControlParams) SetTimeout(timeout time.Duration) {
88 // WithContext adds the context to the subscribe control params
89 func (o *SubscribeControlParams) WithContext(ctx context.Context) *SubscribeControlParams {
94 // SetContext adds the context to the subscribe control params
95 func (o *SubscribeControlParams) SetContext(ctx context.Context) {
99 // WithHTTPClient adds the HTTPClient to the subscribe control params
100 func (o *SubscribeControlParams) WithHTTPClient(client *http.Client) *SubscribeControlParams {
101 o.SetHTTPClient(client)
105 // SetHTTPClient adds the HTTPClient to the subscribe control params
106 func (o *SubscribeControlParams) SetHTTPClient(client *http.Client) {
107 o.HTTPClient = client
110 // WithControlParams adds the controlParams to the subscribe control params
111 func (o *SubscribeControlParams) WithControlParams(controlParams *clientmodel.ControlParams) *SubscribeControlParams {
112 o.SetControlParams(controlParams)
116 // SetControlParams adds the controlParams to the subscribe control params
117 func (o *SubscribeControlParams) SetControlParams(controlParams *clientmodel.ControlParams) {
118 o.ControlParams = controlParams
121 // WriteToRequest writes these params to a swagger request
122 func (o *SubscribeControlParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
124 if err := r.SetTimeout(o.timeout); err != nil {
129 if o.ControlParams != nil {
130 if err := r.SetBodyParam(o.ControlParams); err != nil {
136 return errors.CompositeValidationError(res...)