...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package timestamp
19
20
21
22
23 import (
24 "context"
25 "io"
26 "net/http"
27 "time"
28
29 "github.com/go-openapi/errors"
30 "github.com/go-openapi/runtime"
31 cr "github.com/go-openapi/runtime/client"
32 "github.com/go-openapi/strfmt"
33 )
34
35
36
37
38
39
40
41 func NewGetTimestampResponseParams() *GetTimestampResponseParams {
42 return &GetTimestampResponseParams{
43 timeout: cr.DefaultTimeout,
44 }
45 }
46
47
48
49 func NewGetTimestampResponseParamsWithTimeout(timeout time.Duration) *GetTimestampResponseParams {
50 return &GetTimestampResponseParams{
51 timeout: timeout,
52 }
53 }
54
55
56
57 func NewGetTimestampResponseParamsWithContext(ctx context.Context) *GetTimestampResponseParams {
58 return &GetTimestampResponseParams{
59 Context: ctx,
60 }
61 }
62
63
64
65 func NewGetTimestampResponseParamsWithHTTPClient(client *http.Client) *GetTimestampResponseParams {
66 return &GetTimestampResponseParams{
67 HTTPClient: client,
68 }
69 }
70
71
78 type GetTimestampResponseParams struct {
79
80
81
82
83 Request io.ReadCloser
84
85 timeout time.Duration
86 Context context.Context
87 HTTPClient *http.Client
88 }
89
90
91
92
93 func (o *GetTimestampResponseParams) WithDefaults() *GetTimestampResponseParams {
94 o.SetDefaults()
95 return o
96 }
97
98
99
100
101 func (o *GetTimestampResponseParams) SetDefaults() {
102
103 }
104
105
106 func (o *GetTimestampResponseParams) WithTimeout(timeout time.Duration) *GetTimestampResponseParams {
107 o.SetTimeout(timeout)
108 return o
109 }
110
111
112 func (o *GetTimestampResponseParams) SetTimeout(timeout time.Duration) {
113 o.timeout = timeout
114 }
115
116
117 func (o *GetTimestampResponseParams) WithContext(ctx context.Context) *GetTimestampResponseParams {
118 o.SetContext(ctx)
119 return o
120 }
121
122
123 func (o *GetTimestampResponseParams) SetContext(ctx context.Context) {
124 o.Context = ctx
125 }
126
127
128 func (o *GetTimestampResponseParams) WithHTTPClient(client *http.Client) *GetTimestampResponseParams {
129 o.SetHTTPClient(client)
130 return o
131 }
132
133
134 func (o *GetTimestampResponseParams) SetHTTPClient(client *http.Client) {
135 o.HTTPClient = client
136 }
137
138
139 func (o *GetTimestampResponseParams) WithRequest(request io.ReadCloser) *GetTimestampResponseParams {
140 o.SetRequest(request)
141 return o
142 }
143
144
145 func (o *GetTimestampResponseParams) SetRequest(request io.ReadCloser) {
146 o.Request = request
147 }
148
149
150 func (o *GetTimestampResponseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
151
152 if err := r.SetTimeout(o.timeout); err != nil {
153 return err
154 }
155 var res []error
156 if o.Request != nil {
157 if err := r.SetBodyParam(o.Request); err != nil {
158 return err
159 }
160 }
161
162 if len(res) > 0 {
163 return errors.CompositeValidationError(res...)
164 }
165 return nil
166 }
167
View as plain text