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"
16 "github.com/go-openapi/strfmt"
18 "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientmodel"
21 // NewSubscribeParams creates a new SubscribeParams object
22 // with the default values initialized.
23 func NewSubscribeParams() *SubscribeParams {
25 return &SubscribeParams{
27 timeout: cr.DefaultTimeout,
31 // NewSubscribeParamsWithTimeout creates a new SubscribeParams object
32 // with the default values initialized, and the ability to set a timeout on a request
33 func NewSubscribeParamsWithTimeout(timeout time.Duration) *SubscribeParams {
35 return &SubscribeParams{
41 // NewSubscribeParamsWithContext creates a new SubscribeParams object
42 // with the default values initialized, and the ability to set a context for a request
43 func NewSubscribeParamsWithContext(ctx context.Context) *SubscribeParams {
45 return &SubscribeParams{
51 // NewSubscribeParamsWithHTTPClient creates a new SubscribeParams object
52 // with the default values initialized, and the ability to set a custom HTTPClient for a request
53 func NewSubscribeParamsWithHTTPClient(client *http.Client) *SubscribeParams {
55 return &SubscribeParams{
60 /*SubscribeParams contains all the parameters to send to the API endpoint
61 for the subscribe operation typically these are written to a http.Request
63 type SubscribeParams struct {
66 Subscription parameters
69 SubscriptionParams *clientmodel.SubscriptionParams
72 Context context.Context
73 HTTPClient *http.Client
76 // WithTimeout adds the timeout to the subscribe params
77 func (o *SubscribeParams) WithTimeout(timeout time.Duration) *SubscribeParams {
82 // SetTimeout adds the timeout to the subscribe params
83 func (o *SubscribeParams) SetTimeout(timeout time.Duration) {
87 // WithContext adds the context to the subscribe params
88 func (o *SubscribeParams) WithContext(ctx context.Context) *SubscribeParams {
93 // SetContext adds the context to the subscribe params
94 func (o *SubscribeParams) SetContext(ctx context.Context) {
98 // WithHTTPClient adds the HTTPClient to the subscribe params
99 func (o *SubscribeParams) WithHTTPClient(client *http.Client) *SubscribeParams {
100 o.SetHTTPClient(client)
104 // SetHTTPClient adds the HTTPClient to the subscribe params
105 func (o *SubscribeParams) SetHTTPClient(client *http.Client) {
106 o.HTTPClient = client
109 // WithSubscriptionParams adds the subscriptionParams to the subscribe params
110 func (o *SubscribeParams) WithSubscriptionParams(subscriptionParams *clientmodel.SubscriptionParams) *SubscribeParams {
111 o.SetSubscriptionParams(subscriptionParams)
115 // SetSubscriptionParams adds the subscriptionParams to the subscribe params
116 func (o *SubscribeParams) SetSubscriptionParams(subscriptionParams *clientmodel.SubscriptionParams) {
117 o.SubscriptionParams = subscriptionParams
120 // WriteToRequest writes these params to a swagger request
121 func (o *SubscribeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
123 if err := r.SetTimeout(o.timeout); err != nil {
128 if o.SubscriptionParams != nil {
129 if err := r.SetBodyParam(o.SubscriptionParams); err != nil {
135 return errors.CompositeValidationError(res...)