Add optional subscription ID
[ric-plt/xapp-frame.git] / pkg / clientapi / common / get_all_subscriptions_parameters.go
1 // Code generated by go-swagger; DO NOT EDIT.
2
3 package common
4
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the swagger generate command
7
8 import (
9         "context"
10         "net/http"
11         "time"
12
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"
17 )
18
19 // NewGetAllSubscriptionsParams creates a new GetAllSubscriptionsParams object
20 // with the default values initialized.
21 func NewGetAllSubscriptionsParams() *GetAllSubscriptionsParams {
22
23         return &GetAllSubscriptionsParams{
24
25                 timeout: cr.DefaultTimeout,
26         }
27 }
28
29 // NewGetAllSubscriptionsParamsWithTimeout creates a new GetAllSubscriptionsParams object
30 // with the default values initialized, and the ability to set a timeout on a request
31 func NewGetAllSubscriptionsParamsWithTimeout(timeout time.Duration) *GetAllSubscriptionsParams {
32
33         return &GetAllSubscriptionsParams{
34
35                 timeout: timeout,
36         }
37 }
38
39 // NewGetAllSubscriptionsParamsWithContext creates a new GetAllSubscriptionsParams object
40 // with the default values initialized, and the ability to set a context for a request
41 func NewGetAllSubscriptionsParamsWithContext(ctx context.Context) *GetAllSubscriptionsParams {
42
43         return &GetAllSubscriptionsParams{
44
45                 Context: ctx,
46         }
47 }
48
49 // NewGetAllSubscriptionsParamsWithHTTPClient creates a new GetAllSubscriptionsParams object
50 // with the default values initialized, and the ability to set a custom HTTPClient for a request
51 func NewGetAllSubscriptionsParamsWithHTTPClient(client *http.Client) *GetAllSubscriptionsParams {
52
53         return &GetAllSubscriptionsParams{
54                 HTTPClient: client,
55         }
56 }
57
58 /*GetAllSubscriptionsParams contains all the parameters to send to the API endpoint
59 for the get all subscriptions operation typically these are written to a http.Request
60 */
61 type GetAllSubscriptionsParams struct {
62         timeout    time.Duration
63         Context    context.Context
64         HTTPClient *http.Client
65 }
66
67 // WithTimeout adds the timeout to the get all subscriptions params
68 func (o *GetAllSubscriptionsParams) WithTimeout(timeout time.Duration) *GetAllSubscriptionsParams {
69         o.SetTimeout(timeout)
70         return o
71 }
72
73 // SetTimeout adds the timeout to the get all subscriptions params
74 func (o *GetAllSubscriptionsParams) SetTimeout(timeout time.Duration) {
75         o.timeout = timeout
76 }
77
78 // WithContext adds the context to the get all subscriptions params
79 func (o *GetAllSubscriptionsParams) WithContext(ctx context.Context) *GetAllSubscriptionsParams {
80         o.SetContext(ctx)
81         return o
82 }
83
84 // SetContext adds the context to the get all subscriptions params
85 func (o *GetAllSubscriptionsParams) SetContext(ctx context.Context) {
86         o.Context = ctx
87 }
88
89 // WithHTTPClient adds the HTTPClient to the get all subscriptions params
90 func (o *GetAllSubscriptionsParams) WithHTTPClient(client *http.Client) *GetAllSubscriptionsParams {
91         o.SetHTTPClient(client)
92         return o
93 }
94
95 // SetHTTPClient adds the HTTPClient to the get all subscriptions params
96 func (o *GetAllSubscriptionsParams) SetHTTPClient(client *http.Client) {
97         o.HTTPClient = client
98 }
99
100 // WriteToRequest writes these params to a swagger request
101 func (o *GetAllSubscriptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
102
103         if err := r.SetTimeout(o.timeout); err != nil {
104                 return err
105         }
106         var res []error
107
108         if len(res) > 0 {
109                 return errors.CompositeValidationError(res...)
110         }
111         return nil
112 }