/
job_schedule_update_parameters.go
387 lines (304 loc) · 11.3 KB
/
job_schedule_update_parameters.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
package job_schedules
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"time"
"golang.org/x/net/context"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/swag"
strfmt "github.com/go-openapi/strfmt"
"github.com/jkawamoto/roadie/cloud/azure/batch/models"
)
// NewJobScheduleUpdateParams creates a new JobScheduleUpdateParams object
// with the default values initialized.
func NewJobScheduleUpdateParams() *JobScheduleUpdateParams {
var (
returnClientRequestIDDefault = bool(false)
timeoutDefault = int32(30)
)
return &JobScheduleUpdateParams{
ReturnClientRequestID: &returnClientRequestIDDefault,
Timeout: &timeoutDefault,
requestTimeout: cr.DefaultTimeout,
}
}
// NewJobScheduleUpdateParamsWithTimeout creates a new JobScheduleUpdateParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewJobScheduleUpdateParamsWithTimeout(timeout time.Duration) *JobScheduleUpdateParams {
var (
returnClientRequestIDDefault = bool(false)
timeoutDefault = int32(30)
)
return &JobScheduleUpdateParams{
ReturnClientRequestID: &returnClientRequestIDDefault,
Timeout: &timeoutDefault,
requestTimeout: timeout,
}
}
// NewJobScheduleUpdateParamsWithContext creates a new JobScheduleUpdateParams object
// with the default values initialized, and the ability to set a context for a request
func NewJobScheduleUpdateParamsWithContext(ctx context.Context) *JobScheduleUpdateParams {
var (
returnClientRequestIdDefault = bool(false)
timeoutDefault = int32(30)
)
return &JobScheduleUpdateParams{
ReturnClientRequestID: &returnClientRequestIdDefault,
Timeout: &timeoutDefault,
Context: ctx,
}
}
/*JobScheduleUpdateParams contains all the parameters to send to the API endpoint
for the job schedule update operation typically these are written to a http.Request
*/
type JobScheduleUpdateParams struct {
/*IfMatch
An ETag is specified. Specify this header to perform the operation only if the resource's ETag is an exact match as specified.
*/
IfMatch *string
/*IfModifiedSince
Specify this header to perform the operation only if the resource has been modified since the specified date/time.
*/
IfModifiedSince *string
/*IfNoneMatch
An ETag is specified. Specify this header to perform the operation only if the resource's ETag does not match the specified ETag.
*/
IfNoneMatch *string
/*IfUnmodifiedSince
Specify this header to perform the operation only if the resource has not been modified since the specified date/time.
*/
IfUnmodifiedSince *string
/*APIVersion
Client API Version.
*/
APIVersion string
/*ClientRequestID
The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.
*/
ClientRequestID *string
/*JobScheduleID
The ID of the job schedule to update.
*/
JobScheduleID string
/*JobScheduleUpdateParameter
The parameters for the request.
*/
JobScheduleUpdateParameter *models.JobScheduleUpdateParameter
/*OcpDate
The time the request was issued. If not specified, this header will be automatically populated with the current system clock time.
*/
OcpDate *string
/*ReturnClientRequestID
Whether the server should return the client-request-id in the response.
*/
ReturnClientRequestID *bool
/*Timeout
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds.
*/
Timeout *int32
requestTimeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithRequestTimeout adds the timeout to the job schedule update params
func (o *JobScheduleUpdateParams) WithRequestTimeout(timeout time.Duration) *JobScheduleUpdateParams {
o.SetRequestTimeout(timeout)
return o
}
// SetRequestTimeout adds the timeout to the job schedule update params
func (o *JobScheduleUpdateParams) SetRequestTimeout(timeout time.Duration) {
o.requestTimeout = timeout
}
// WithContext adds the context to the job schedule update params
func (o *JobScheduleUpdateParams) WithContext(ctx context.Context) *JobScheduleUpdateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the job schedule update params
func (o *JobScheduleUpdateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithIfMatch adds the ifMatch to the job schedule update params
func (o *JobScheduleUpdateParams) WithIfMatch(ifMatch *string) *JobScheduleUpdateParams {
o.SetIfMatch(ifMatch)
return o
}
// SetIfMatch adds the ifMatch to the job schedule update params
func (o *JobScheduleUpdateParams) SetIfMatch(ifMatch *string) {
o.IfMatch = ifMatch
}
// WithIfModifiedSince adds the ifModifiedSince to the job schedule update params
func (o *JobScheduleUpdateParams) WithIfModifiedSince(ifModifiedSince *string) *JobScheduleUpdateParams {
o.SetIfModifiedSince(ifModifiedSince)
return o
}
// SetIfModifiedSince adds the ifModifiedSince to the job schedule update params
func (o *JobScheduleUpdateParams) SetIfModifiedSince(ifModifiedSince *string) {
o.IfModifiedSince = ifModifiedSince
}
// WithIfNoneMatch adds the ifNoneMatch to the job schedule update params
func (o *JobScheduleUpdateParams) WithIfNoneMatch(ifNoneMatch *string) *JobScheduleUpdateParams {
o.SetIfNoneMatch(ifNoneMatch)
return o
}
// SetIfNoneMatch adds the ifNoneMatch to the job schedule update params
func (o *JobScheduleUpdateParams) SetIfNoneMatch(ifNoneMatch *string) {
o.IfNoneMatch = ifNoneMatch
}
// WithIfUnmodifiedSince adds the ifUnmodifiedSince to the job schedule update params
func (o *JobScheduleUpdateParams) WithIfUnmodifiedSince(ifUnmodifiedSince *string) *JobScheduleUpdateParams {
o.SetIfUnmodifiedSince(ifUnmodifiedSince)
return o
}
// SetIfUnmodifiedSince adds the ifUnmodifiedSince to the job schedule update params
func (o *JobScheduleUpdateParams) SetIfUnmodifiedSince(ifUnmodifiedSince *string) {
o.IfUnmodifiedSince = ifUnmodifiedSince
}
// WithAPIVersion adds the aPIVersion to the job schedule update params
func (o *JobScheduleUpdateParams) WithAPIVersion(aPIVersion string) *JobScheduleUpdateParams {
o.SetAPIVersion(aPIVersion)
return o
}
// SetAPIVersion adds the apiVersion to the job schedule update params
func (o *JobScheduleUpdateParams) SetAPIVersion(aPIVersion string) {
o.APIVersion = aPIVersion
}
// WithClientRequestID adds the clientRequestID to the job schedule update params
func (o *JobScheduleUpdateParams) WithClientRequestID(clientRequestID *string) *JobScheduleUpdateParams {
o.SetClientRequestID(clientRequestID)
return o
}
// SetClientRequestID adds the clientRequestId to the job schedule update params
func (o *JobScheduleUpdateParams) SetClientRequestID(clientRequestID *string) {
o.ClientRequestID = clientRequestID
}
// WithJobScheduleID adds the jobScheduleID to the job schedule update params
func (o *JobScheduleUpdateParams) WithJobScheduleID(jobScheduleID string) *JobScheduleUpdateParams {
o.SetJobScheduleID(jobScheduleID)
return o
}
// SetJobScheduleID adds the jobScheduleId to the job schedule update params
func (o *JobScheduleUpdateParams) SetJobScheduleID(jobScheduleID string) {
o.JobScheduleID = jobScheduleID
}
// WithJobScheduleUpdateParameter adds the jobScheduleUpdateParameter to the job schedule update params
func (o *JobScheduleUpdateParams) WithJobScheduleUpdateParameter(jobScheduleUpdateParameter *models.JobScheduleUpdateParameter) *JobScheduleUpdateParams {
o.SetJobScheduleUpdateParameter(jobScheduleUpdateParameter)
return o
}
// SetJobScheduleUpdateParameter adds the jobScheduleUpdateParameter to the job schedule update params
func (o *JobScheduleUpdateParams) SetJobScheduleUpdateParameter(jobScheduleUpdateParameter *models.JobScheduleUpdateParameter) {
o.JobScheduleUpdateParameter = jobScheduleUpdateParameter
}
// WithOcpDate adds the ocpDate to the job schedule update params
func (o *JobScheduleUpdateParams) WithOcpDate(ocpDate *string) *JobScheduleUpdateParams {
o.SetOcpDate(ocpDate)
return o
}
// SetOcpDate adds the ocpDate to the job schedule update params
func (o *JobScheduleUpdateParams) SetOcpDate(ocpDate *string) {
o.OcpDate = ocpDate
}
// WithReturnClientRequestID adds the returnClientRequestID to the job schedule update params
func (o *JobScheduleUpdateParams) WithReturnClientRequestID(returnClientRequestID *bool) *JobScheduleUpdateParams {
o.SetReturnClientRequestID(returnClientRequestID)
return o
}
// SetReturnClientRequestID adds the returnClientRequestId to the job schedule update params
func (o *JobScheduleUpdateParams) SetReturnClientRequestID(returnClientRequestID *bool) {
o.ReturnClientRequestID = returnClientRequestID
}
// WithTimeout adds the timeout to the job schedule update params
func (o *JobScheduleUpdateParams) WithTimeout(timeout *int32) *JobScheduleUpdateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the job schedule update params
func (o *JobScheduleUpdateParams) SetTimeout(timeout *int32) {
o.Timeout = timeout
}
// WriteToRequest writes these params to a swagger request
func (o *JobScheduleUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
if o.IfMatch != nil {
// header param If-Match
if err := r.SetHeaderParam("If-Match", *o.IfMatch); err != nil {
return err
}
}
if o.IfModifiedSince != nil {
// header param If-Modified-Since
if err := r.SetHeaderParam("If-Modified-Since", *o.IfModifiedSince); err != nil {
return err
}
}
if o.IfNoneMatch != nil {
// header param If-None-Match
if err := r.SetHeaderParam("If-None-Match", *o.IfNoneMatch); err != nil {
return err
}
}
if o.IfUnmodifiedSince != nil {
// header param If-Unmodified-Since
if err := r.SetHeaderParam("If-Unmodified-Since", *o.IfUnmodifiedSince); err != nil {
return err
}
}
// query param api-version
qrAPIVersion := o.APIVersion
qAPIVersion := qrAPIVersion
if qAPIVersion != "" {
if err := r.SetQueryParam("api-version", qAPIVersion); err != nil {
return err
}
}
if o.ClientRequestID != nil {
// header param client-request-id
if err := r.SetHeaderParam("client-request-id", *o.ClientRequestID); err != nil {
return err
}
}
// path param jobScheduleId
if err := r.SetPathParam("jobScheduleId", o.JobScheduleID); err != nil {
return err
}
if o.JobScheduleUpdateParameter == nil {
o.JobScheduleUpdateParameter = new(models.JobScheduleUpdateParameter)
}
if err := r.SetBodyParam(o.JobScheduleUpdateParameter); err != nil {
return err
}
if o.OcpDate != nil {
// header param ocp-date
if err := r.SetHeaderParam("ocp-date", *o.OcpDate); err != nil {
return err
}
}
if o.ReturnClientRequestID != nil {
// header param return-client-request-id
if err := r.SetHeaderParam("return-client-request-id", swag.FormatBool(*o.ReturnClientRequestID)); err != nil {
return err
}
}
if o.Timeout != nil {
// query param timeout
var qrTimeout int32
if o.Timeout != nil {
qrTimeout = *o.Timeout
}
qTimeout := swag.FormatInt32(qrTimeout)
if qTimeout != "" {
if err := r.SetQueryParam("timeout", qTimeout); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}