forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
536 lines (473 loc) · 21.6 KB
/
models.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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
package scheduler
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"net/http"
)
// DayOfWeek enumerates the values for day of week.
type DayOfWeek string
const (
// Friday specifies the friday state for day of week.
Friday DayOfWeek = "Friday"
// Monday specifies the monday state for day of week.
Monday DayOfWeek = "Monday"
// Saturday specifies the saturday state for day of week.
Saturday DayOfWeek = "Saturday"
// Sunday specifies the sunday state for day of week.
Sunday DayOfWeek = "Sunday"
// Thursday specifies the thursday state for day of week.
Thursday DayOfWeek = "Thursday"
// Tuesday specifies the tuesday state for day of week.
Tuesday DayOfWeek = "Tuesday"
// Wednesday specifies the wednesday state for day of week.
Wednesday DayOfWeek = "Wednesday"
)
// HTTPAuthenticationType enumerates the values for http authentication type.
type HTTPAuthenticationType string
const (
// ActiveDirectoryOAuth specifies the active directory o auth state for
// http authentication type.
ActiveDirectoryOAuth HTTPAuthenticationType = "ActiveDirectoryOAuth"
// Basic specifies the basic state for http authentication type.
Basic HTTPAuthenticationType = "Basic"
// ClientCertificate specifies the client certificate state for http
// authentication type.
ClientCertificate HTTPAuthenticationType = "ClientCertificate"
// NotSpecified specifies the not specified state for http authentication
// type.
NotSpecified HTTPAuthenticationType = "NotSpecified"
)
// JobActionType enumerates the values for job action type.
type JobActionType string
const (
// HTTP specifies the http state for job action type.
HTTP JobActionType = "Http"
// HTTPS specifies the https state for job action type.
HTTPS JobActionType = "Https"
// ServiceBusQueue specifies the service bus queue state for job action
// type.
ServiceBusQueue JobActionType = "ServiceBusQueue"
// ServiceBusTopic specifies the service bus topic state for job action
// type.
ServiceBusTopic JobActionType = "ServiceBusTopic"
// StorageQueue specifies the storage queue state for job action type.
StorageQueue JobActionType = "StorageQueue"
)
// JobCollectionState enumerates the values for job collection state.
type JobCollectionState string
const (
// Deleted specifies the deleted state for job collection state.
Deleted JobCollectionState = "Deleted"
// Disabled specifies the disabled state for job collection state.
Disabled JobCollectionState = "Disabled"
// Enabled specifies the enabled state for job collection state.
Enabled JobCollectionState = "Enabled"
// Suspended specifies the suspended state for job collection state.
Suspended JobCollectionState = "Suspended"
)
// JobExecutionStatus enumerates the values for job execution status.
type JobExecutionStatus string
const (
// Completed specifies the completed state for job execution status.
Completed JobExecutionStatus = "Completed"
// Failed specifies the failed state for job execution status.
Failed JobExecutionStatus = "Failed"
// Postponed specifies the postponed state for job execution status.
Postponed JobExecutionStatus = "Postponed"
)
// JobHistoryActionName enumerates the values for job history action name.
type JobHistoryActionName string
const (
// ErrorAction specifies the error action state for job history action
// name.
ErrorAction JobHistoryActionName = "ErrorAction"
// MainAction specifies the main action state for job history action name.
MainAction JobHistoryActionName = "MainAction"
)
// JobScheduleDay enumerates the values for job schedule day.
type JobScheduleDay string
const (
// JobScheduleDayFriday specifies the job schedule day friday state for
// job schedule day.
JobScheduleDayFriday JobScheduleDay = "Friday"
// JobScheduleDayMonday specifies the job schedule day monday state for
// job schedule day.
JobScheduleDayMonday JobScheduleDay = "Monday"
// JobScheduleDaySaturday specifies the job schedule day saturday state
// for job schedule day.
JobScheduleDaySaturday JobScheduleDay = "Saturday"
// JobScheduleDaySunday specifies the job schedule day sunday state for
// job schedule day.
JobScheduleDaySunday JobScheduleDay = "Sunday"
// JobScheduleDayThursday specifies the job schedule day thursday state
// for job schedule day.
JobScheduleDayThursday JobScheduleDay = "Thursday"
// JobScheduleDayTuesday specifies the job schedule day tuesday state for
// job schedule day.
JobScheduleDayTuesday JobScheduleDay = "Tuesday"
// JobScheduleDayWednesday specifies the job schedule day wednesday state
// for job schedule day.
JobScheduleDayWednesday JobScheduleDay = "Wednesday"
)
// JobState enumerates the values for job state.
type JobState string
const (
// JobStateCompleted specifies the job state completed state for job state.
JobStateCompleted JobState = "Completed"
// JobStateDisabled specifies the job state disabled state for job state.
JobStateDisabled JobState = "Disabled"
// JobStateEnabled specifies the job state enabled state for job state.
JobStateEnabled JobState = "Enabled"
// JobStateFaulted specifies the job state faulted state for job state.
JobStateFaulted JobState = "Faulted"
)
// RecurrenceFrequency enumerates the values for recurrence frequency.
type RecurrenceFrequency string
const (
// Day specifies the day state for recurrence frequency.
Day RecurrenceFrequency = "Day"
// Hour specifies the hour state for recurrence frequency.
Hour RecurrenceFrequency = "Hour"
// Minute specifies the minute state for recurrence frequency.
Minute RecurrenceFrequency = "Minute"
// Month specifies the month state for recurrence frequency.
Month RecurrenceFrequency = "Month"
// Week specifies the week state for recurrence frequency.
Week RecurrenceFrequency = "Week"
)
// RetryType enumerates the values for retry type.
type RetryType string
const (
// Fixed specifies the fixed state for retry type.
Fixed RetryType = "Fixed"
// None specifies the none state for retry type.
None RetryType = "None"
)
// ServiceBusAuthenticationType enumerates the values for service bus
// authentication type.
type ServiceBusAuthenticationType string
const (
// ServiceBusAuthenticationTypeNotSpecified specifies the service bus
// authentication type not specified state for service bus authentication
// type.
ServiceBusAuthenticationTypeNotSpecified ServiceBusAuthenticationType = "NotSpecified"
// ServiceBusAuthenticationTypeSharedAccessKey specifies the service bus
// authentication type shared access key state for service bus
// authentication type.
ServiceBusAuthenticationTypeSharedAccessKey ServiceBusAuthenticationType = "SharedAccessKey"
)
// ServiceBusTransportType enumerates the values for service bus transport
// type.
type ServiceBusTransportType string
const (
// ServiceBusTransportTypeAMQP specifies the service bus transport type
// amqp state for service bus transport type.
ServiceBusTransportTypeAMQP ServiceBusTransportType = "AMQP"
// ServiceBusTransportTypeNetMessaging specifies the service bus transport
// type net messaging state for service bus transport type.
ServiceBusTransportTypeNetMessaging ServiceBusTransportType = "NetMessaging"
// ServiceBusTransportTypeNotSpecified specifies the service bus transport
// type not specified state for service bus transport type.
ServiceBusTransportTypeNotSpecified ServiceBusTransportType = "NotSpecified"
)
// SkuDefinition enumerates the values for sku definition.
type SkuDefinition string
const (
// Free specifies the free state for sku definition.
Free SkuDefinition = "Free"
// P10Premium specifies the p10 premium state for sku definition.
P10Premium SkuDefinition = "P10Premium"
// P20Premium specifies the p20 premium state for sku definition.
P20Premium SkuDefinition = "P20Premium"
// Standard specifies the standard state for sku definition.
Standard SkuDefinition = "Standard"
)
// BasicAuthentication is
type BasicAuthentication struct {
Type HTTPAuthenticationType `json:"type,omitempty"`
Username *string `json:"username,omitempty"`
Password *string `json:"password,omitempty"`
}
// ClientCertAuthentication is
type ClientCertAuthentication struct {
Type HTTPAuthenticationType `json:"type,omitempty"`
Password *string `json:"password,omitempty"`
Pfx *string `json:"pfx,omitempty"`
CertificateThumbprint *string `json:"certificateThumbprint,omitempty"`
CertificateExpirationDate *date.Time `json:"certificateExpirationDate,omitempty"`
CertificateSubjectName *string `json:"certificateSubjectName,omitempty"`
}
// HTTPAuthentication is
type HTTPAuthentication struct {
Type HTTPAuthenticationType `json:"type,omitempty"`
}
// HTTPRequest is
type HTTPRequest struct {
Authentication *HTTPAuthentication `json:"authentication,omitempty"`
URI *string `json:"uri,omitempty"`
Method *string `json:"method,omitempty"`
Body *string `json:"body,omitempty"`
Headers *map[string]*string `json:"headers,omitempty"`
}
// JobAction is
type JobAction struct {
Type JobActionType `json:"type,omitempty"`
Request *HTTPRequest `json:"request,omitempty"`
QueueMessage *StorageQueueMessage `json:"queueMessage,omitempty"`
ServiceBusQueueMessage *ServiceBusQueueMessage `json:"serviceBusQueueMessage,omitempty"`
ServiceBusTopicMessage *ServiceBusTopicMessage `json:"serviceBusTopicMessage,omitempty"`
RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"`
ErrorAction *JobErrorAction `json:"errorAction,omitempty"`
}
// JobCollectionDefinition is
type JobCollectionDefinition struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
Name *string `json:"name,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
Properties *JobCollectionProperties `json:"properties,omitempty"`
}
// JobCollectionListResult is
type JobCollectionListResult struct {
autorest.Response `json:"-"`
Value *[]JobCollectionDefinition `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// JobCollectionListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client JobCollectionListResult) JobCollectionListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// JobCollectionProperties is
type JobCollectionProperties struct {
Sku *Sku `json:"sku,omitempty"`
State JobCollectionState `json:"state,omitempty"`
Quota *JobCollectionQuota `json:"quota,omitempty"`
}
// JobCollectionQuota is
type JobCollectionQuota struct {
MaxJobCount *int32 `json:"maxJobCount,omitempty"`
MaxJobOccurrence *int32 `json:"maxJobOccurrence,omitempty"`
MaxRecurrence *JobMaxRecurrence `json:"maxRecurrence,omitempty"`
}
// JobDefinition is
type JobDefinition struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
Name *string `json:"name,omitempty"`
Properties *JobProperties `json:"properties,omitempty"`
}
// JobErrorAction is
type JobErrorAction struct {
Type JobActionType `json:"type,omitempty"`
Request *HTTPRequest `json:"request,omitempty"`
QueueMessage *StorageQueueMessage `json:"queueMessage,omitempty"`
ServiceBusQueueMessage *ServiceBusQueueMessage `json:"serviceBusQueueMessage,omitempty"`
ServiceBusTopicMessage *ServiceBusTopicMessage `json:"serviceBusTopicMessage,omitempty"`
RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"`
}
// JobHistoryDefinition is
type JobHistoryDefinition struct {
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
Name *string `json:"name,omitempty"`
Properties *JobHistoryDefinitionProperties `json:"properties,omitempty"`
}
// JobHistoryDefinitionProperties is
type JobHistoryDefinitionProperties struct {
StartTime *date.Time `json:"startTime,omitempty"`
EndTime *date.Time `json:"endTime,omitempty"`
ExpectedExecutionTime *date.Time `json:"expectedExecutionTime,omitempty"`
ActionName JobHistoryActionName `json:"actionName,omitempty"`
Status JobExecutionStatus `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
RetryCount *int32 `json:"retryCount,omitempty"`
RepeatCount *int32 `json:"repeatCount,omitempty"`
}
// JobHistoryFilter is
type JobHistoryFilter struct {
Status JobExecutionStatus `json:"status,omitempty"`
}
// JobHistoryListResult is
type JobHistoryListResult struct {
autorest.Response `json:"-"`
Value *[]JobHistoryDefinition `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// JobHistoryListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client JobHistoryListResult) JobHistoryListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// JobListResult is
type JobListResult struct {
autorest.Response `json:"-"`
Value *[]JobDefinition `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// JobListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client JobListResult) JobListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// JobMaxRecurrence is
type JobMaxRecurrence struct {
Frequency RecurrenceFrequency `json:"frequency,omitempty"`
Interval *int32 `json:"interval,omitempty"`
}
// JobProperties is
type JobProperties struct {
StartTime *date.Time `json:"startTime,omitempty"`
Action *JobAction `json:"action,omitempty"`
Recurrence *JobRecurrence `json:"recurrence,omitempty"`
State JobState `json:"state,omitempty"`
Status *JobStatus `json:"status,omitempty"`
}
// JobRecurrence is
type JobRecurrence struct {
Frequency RecurrenceFrequency `json:"frequency,omitempty"`
Interval *int32 `json:"interval,omitempty"`
Count *int32 `json:"count,omitempty"`
EndTime *date.Time `json:"endTime,omitempty"`
Schedule *JobRecurrenceSchedule `json:"schedule,omitempty"`
}
// JobRecurrenceSchedule is
type JobRecurrenceSchedule struct {
WeekDays *[]DayOfWeek `json:"weekDays,omitempty"`
Hours *[]int32 `json:"hours,omitempty"`
Minutes *[]int32 `json:"minutes,omitempty"`
MonthDays *[]int32 `json:"monthDays,omitempty"`
MonthlyOccurrences *[]JobRecurrenceScheduleMonthlyOccurrence `json:"monthlyOccurrences,omitempty"`
}
// JobRecurrenceScheduleMonthlyOccurrence is
type JobRecurrenceScheduleMonthlyOccurrence struct {
Day JobScheduleDay `json:"day,omitempty"`
Occurrence *int32 `json:"Occurrence,omitempty"`
}
// JobStateFilter is
type JobStateFilter struct {
State JobState `json:"state,omitempty"`
}
// JobStatus is
type JobStatus struct {
ExecutionCount *int32 `json:"executionCount,omitempty"`
FailureCount *int32 `json:"failureCount,omitempty"`
FaultedCount *int32 `json:"faultedCount,omitempty"`
LastExecutionTime *date.Time `json:"lastExecutionTime,omitempty"`
NextExecutionTime *date.Time `json:"nextExecutionTime,omitempty"`
}
// OAuthAuthentication is
type OAuthAuthentication struct {
Type HTTPAuthenticationType `json:"type,omitempty"`
Secret *string `json:"secret,omitempty"`
Tenant *string `json:"tenant,omitempty"`
Audience *string `json:"audience,omitempty"`
ClientID *string `json:"clientId,omitempty"`
}
// RetryPolicy is
type RetryPolicy struct {
RetryType RetryType `json:"retryType,omitempty"`
RetryInterval *string `json:"retryInterval,omitempty"`
RetryCount *int32 `json:"retryCount,omitempty"`
}
// ServiceBusAuthentication is
type ServiceBusAuthentication struct {
SasKey *string `json:"sasKey,omitempty"`
SasKeyName *string `json:"sasKeyName,omitempty"`
Type ServiceBusAuthenticationType `json:"type,omitempty"`
}
// ServiceBusBrokeredMessageProperties is
type ServiceBusBrokeredMessageProperties struct {
ContentType *string `json:"contentType,omitempty"`
CorrelationID *string `json:"correlationId,omitempty"`
ForcePersistence *bool `json:"forcePersistence,omitempty"`
Label *string `json:"label,omitempty"`
MessageID *string `json:"messageId,omitempty"`
PartitionKey *string `json:"partitionKey,omitempty"`
ReplyTo *string `json:"replyTo,omitempty"`
ReplyToSessionID *string `json:"replyToSessionId,omitempty"`
ScheduledEnqueueTimeUtc *date.Time `json:"scheduledEnqueueTimeUtc,omitempty"`
SessionID *string `json:"sessionId,omitempty"`
TimeToLive *date.Time `json:"timeToLive,omitempty"`
To *string `json:"to,omitempty"`
ViaPartitionKey *string `json:"viaPartitionKey,omitempty"`
}
// ServiceBusMessage is
type ServiceBusMessage struct {
Authentication *ServiceBusAuthentication `json:"authentication,omitempty"`
BrokeredMessageProperties *ServiceBusBrokeredMessageProperties `json:"brokeredMessageProperties,omitempty"`
CustomMessageProperties *map[string]*string `json:"customMessageProperties,omitempty"`
Message *string `json:"message,omitempty"`
Namespace *string `json:"namespace,omitempty"`
TransportType ServiceBusTransportType `json:"transportType,omitempty"`
}
// ServiceBusQueueMessage is
type ServiceBusQueueMessage struct {
Authentication *ServiceBusAuthentication `json:"authentication,omitempty"`
BrokeredMessageProperties *ServiceBusBrokeredMessageProperties `json:"brokeredMessageProperties,omitempty"`
CustomMessageProperties *map[string]*string `json:"customMessageProperties,omitempty"`
Message *string `json:"message,omitempty"`
Namespace *string `json:"namespace,omitempty"`
TransportType ServiceBusTransportType `json:"transportType,omitempty"`
QueueName *string `json:"queueName,omitempty"`
}
// ServiceBusTopicMessage is
type ServiceBusTopicMessage struct {
Authentication *ServiceBusAuthentication `json:"authentication,omitempty"`
BrokeredMessageProperties *ServiceBusBrokeredMessageProperties `json:"brokeredMessageProperties,omitempty"`
CustomMessageProperties *map[string]*string `json:"customMessageProperties,omitempty"`
Message *string `json:"message,omitempty"`
Namespace *string `json:"namespace,omitempty"`
TransportType ServiceBusTransportType `json:"transportType,omitempty"`
TopicPath *string `json:"topicPath,omitempty"`
}
// Sku is
type Sku struct {
Name SkuDefinition `json:"name,omitempty"`
}
// StorageQueueMessage is
type StorageQueueMessage struct {
StorageAccount *string `json:"storageAccount,omitempty"`
QueueName *string `json:"queueName,omitempty"`
SasToken *string `json:"sasToken,omitempty"`
Message *string `json:"message,omitempty"`
}