forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
683 lines (604 loc) · 31 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
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
package devices
// 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.
// 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"
)
// AccessRights enumerates the values for access rights.
type AccessRights string
const (
// DeviceConnect specifies the device connect state for access rights.
DeviceConnect AccessRights = "DeviceConnect"
// RegistryRead specifies the registry read state for access rights.
RegistryRead AccessRights = "RegistryRead"
// RegistryReadDeviceConnect specifies the registry read device connect state for access rights.
RegistryReadDeviceConnect AccessRights = "RegistryRead, DeviceConnect"
// RegistryReadRegistryWrite specifies the registry read registry write state for access rights.
RegistryReadRegistryWrite AccessRights = "RegistryRead, RegistryWrite"
// RegistryReadRegistryWriteDeviceConnect specifies the registry read registry write device connect state for access
// rights.
RegistryReadRegistryWriteDeviceConnect AccessRights = "RegistryRead, RegistryWrite, DeviceConnect"
// RegistryReadRegistryWriteServiceConnect specifies the registry read registry write service connect state for access
// rights.
RegistryReadRegistryWriteServiceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect"
// RegistryReadRegistryWriteServiceConnectDeviceConnect specifies the registry read registry write service connect
// device connect state for access rights.
RegistryReadRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect"
// RegistryReadServiceConnect specifies the registry read service connect state for access rights.
RegistryReadServiceConnect AccessRights = "RegistryRead, ServiceConnect"
// RegistryReadServiceConnectDeviceConnect specifies the registry read service connect device connect state for access
// rights.
RegistryReadServiceConnectDeviceConnect AccessRights = "RegistryRead, ServiceConnect, DeviceConnect"
// RegistryWrite specifies the registry write state for access rights.
RegistryWrite AccessRights = "RegistryWrite"
// RegistryWriteDeviceConnect specifies the registry write device connect state for access rights.
RegistryWriteDeviceConnect AccessRights = "RegistryWrite, DeviceConnect"
// RegistryWriteServiceConnect specifies the registry write service connect state for access rights.
RegistryWriteServiceConnect AccessRights = "RegistryWrite, ServiceConnect"
// RegistryWriteServiceConnectDeviceConnect specifies the registry write service connect device connect state for
// access rights.
RegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryWrite, ServiceConnect, DeviceConnect"
// ServiceConnect specifies the service connect state for access rights.
ServiceConnect AccessRights = "ServiceConnect"
// ServiceConnectDeviceConnect specifies the service connect device connect state for access rights.
ServiceConnectDeviceConnect AccessRights = "ServiceConnect, DeviceConnect"
)
// Capabilities enumerates the values for capabilities.
type Capabilities string
const (
// DeviceManagement specifies the device management state for capabilities.
DeviceManagement Capabilities = "DeviceManagement"
// None specifies the none state for capabilities.
None Capabilities = "None"
)
// IotHubNameUnavailabilityReason enumerates the values for iot hub name unavailability reason.
type IotHubNameUnavailabilityReason string
const (
// AlreadyExists specifies the already exists state for iot hub name unavailability reason.
AlreadyExists IotHubNameUnavailabilityReason = "AlreadyExists"
// Invalid specifies the invalid state for iot hub name unavailability reason.
Invalid IotHubNameUnavailabilityReason = "Invalid"
)
// IotHubScaleType enumerates the values for iot hub scale type.
type IotHubScaleType string
const (
// IotHubScaleTypeAutomatic specifies the iot hub scale type automatic state for iot hub scale type.
IotHubScaleTypeAutomatic IotHubScaleType = "Automatic"
// IotHubScaleTypeManual specifies the iot hub scale type manual state for iot hub scale type.
IotHubScaleTypeManual IotHubScaleType = "Manual"
// IotHubScaleTypeNone specifies the iot hub scale type none state for iot hub scale type.
IotHubScaleTypeNone IotHubScaleType = "None"
)
// IotHubSku enumerates the values for iot hub sku.
type IotHubSku string
const (
// F1 specifies the f1 state for iot hub sku.
F1 IotHubSku = "F1"
// S1 specifies the s1 state for iot hub sku.
S1 IotHubSku = "S1"
// S2 specifies the s2 state for iot hub sku.
S2 IotHubSku = "S2"
// S3 specifies the s3 state for iot hub sku.
S3 IotHubSku = "S3"
)
// IotHubSkuTier enumerates the values for iot hub sku tier.
type IotHubSkuTier string
const (
// Free specifies the free state for iot hub sku tier.
Free IotHubSkuTier = "Free"
// Standard specifies the standard state for iot hub sku tier.
Standard IotHubSkuTier = "Standard"
)
// IPFilterActionType enumerates the values for ip filter action type.
type IPFilterActionType string
const (
// Accept specifies the accept state for ip filter action type.
Accept IPFilterActionType = "Accept"
// Reject specifies the reject state for ip filter action type.
Reject IPFilterActionType = "Reject"
)
// JobStatus enumerates the values for job status.
type JobStatus string
const (
// Cancelled specifies the cancelled state for job status.
Cancelled JobStatus = "cancelled"
// Completed specifies the completed state for job status.
Completed JobStatus = "completed"
// Enqueued specifies the enqueued state for job status.
Enqueued JobStatus = "enqueued"
// Failed specifies the failed state for job status.
Failed JobStatus = "failed"
// Running specifies the running state for job status.
Running JobStatus = "running"
// Unknown specifies the unknown state for job status.
Unknown JobStatus = "unknown"
)
// JobType enumerates the values for job type.
type JobType string
const (
// JobTypeBackup specifies the job type backup state for job type.
JobTypeBackup JobType = "backup"
// JobTypeExport specifies the job type export state for job type.
JobTypeExport JobType = "export"
// JobTypeFactoryResetDevice specifies the job type factory reset device state for job type.
JobTypeFactoryResetDevice JobType = "factoryResetDevice"
// JobTypeFirmwareUpdate specifies the job type firmware update state for job type.
JobTypeFirmwareUpdate JobType = "firmwareUpdate"
// JobTypeImport specifies the job type import state for job type.
JobTypeImport JobType = "import"
// JobTypeReadDeviceProperties specifies the job type read device properties state for job type.
JobTypeReadDeviceProperties JobType = "readDeviceProperties"
// JobTypeRebootDevice specifies the job type reboot device state for job type.
JobTypeRebootDevice JobType = "rebootDevice"
// JobTypeUnknown specifies the job type unknown state for job type.
JobTypeUnknown JobType = "unknown"
// JobTypeUpdateDeviceConfiguration specifies the job type update device configuration state for job type.
JobTypeUpdateDeviceConfiguration JobType = "updateDeviceConfiguration"
// JobTypeWriteDeviceProperties specifies the job type write device properties state for job type.
JobTypeWriteDeviceProperties JobType = "writeDeviceProperties"
)
// OperationMonitoringLevel enumerates the values for operation monitoring level.
type OperationMonitoringLevel string
const (
// OperationMonitoringLevelError specifies the operation monitoring level error state for operation monitoring level.
OperationMonitoringLevelError OperationMonitoringLevel = "Error"
// OperationMonitoringLevelErrorInformation specifies the operation monitoring level error information state for
// operation monitoring level.
OperationMonitoringLevelErrorInformation OperationMonitoringLevel = "Error, Information"
// OperationMonitoringLevelInformation specifies the operation monitoring level information state for operation
// monitoring level.
OperationMonitoringLevelInformation OperationMonitoringLevel = "Information"
// OperationMonitoringLevelNone specifies the operation monitoring level none state for operation monitoring level.
OperationMonitoringLevelNone OperationMonitoringLevel = "None"
)
// RoutingSource enumerates the values for routing source.
type RoutingSource string
const (
// DeviceJobLifecycleEvents specifies the device job lifecycle events state for routing source.
DeviceJobLifecycleEvents RoutingSource = "DeviceJobLifecycleEvents"
// DeviceLifecycleEvents specifies the device lifecycle events state for routing source.
DeviceLifecycleEvents RoutingSource = "DeviceLifecycleEvents"
// DeviceMessages specifies the device messages state for routing source.
DeviceMessages RoutingSource = "DeviceMessages"
// TwinChangeEvents specifies the twin change events state for routing source.
TwinChangeEvents RoutingSource = "TwinChangeEvents"
)
// CertificateBodyDescription is the JSON-serialized X509 Certificate.
type CertificateBodyDescription struct {
Certificate *string `json:"certificate,omitempty"`
}
// CertificateDescription is the X509 Certificate.
type CertificateDescription struct {
autorest.Response `json:"-"`
Properties *CertificateProperties `json:"properties,omitempty"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Etag *string `json:"etag,omitempty"`
Type *string `json:"type,omitempty"`
}
// CertificateListDescription is the JSON-serialized array of Certificate objects.
type CertificateListDescription struct {
autorest.Response `json:"-"`
Value *[]CertificateDescription `json:"value,omitempty"`
}
// CertificateProperties is the description of an X509 CA Certificate.
type CertificateProperties struct {
Subject *string `json:"subject,omitempty"`
Expiry *date.TimeRFC1123 `json:"expiry,omitempty"`
Thumbprint *string `json:"thumbprint,omitempty"`
IsVerified *bool `json:"isVerified,omitempty"`
Created *date.TimeRFC1123 `json:"created,omitempty"`
Updated *date.TimeRFC1123 `json:"updated,omitempty"`
}
// CertificatePropertiesWithNonce is the description of an X509 CA Certificate including the challenge nonce issued for
// the Proof-Of-Possession flow.
type CertificatePropertiesWithNonce struct {
Subject *string `json:"subject,omitempty"`
Expiry *date.TimeRFC1123 `json:"expiry,omitempty"`
Thumbprint *string `json:"thumbprint,omitempty"`
IsVerified *bool `json:"isVerified,omitempty"`
Created *date.TimeRFC1123 `json:"created,omitempty"`
Updated *date.TimeRFC1123 `json:"updated,omitempty"`
VerificationCode *string `json:"verificationCode,omitempty"`
}
// CertificateVerificationDescription is the JSON-serialized leaf certificate
type CertificateVerificationDescription struct {
Certificate *string `json:"certificate,omitempty"`
}
// CertificateWithNonceDescription is the X509 Certificate.
type CertificateWithNonceDescription struct {
autorest.Response `json:"-"`
Properties *CertificatePropertiesWithNonce `json:"properties,omitempty"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Etag *string `json:"etag,omitempty"`
Type *string `json:"type,omitempty"`
}
// CloudToDeviceProperties is the IoT hub cloud-to-device messaging properties.
type CloudToDeviceProperties struct {
MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"`
DefaultTTLAsIso8601 *string `json:"defaultTtlAsIso8601,omitempty"`
Feedback *FeedbackProperties `json:"feedback,omitempty"`
}
// ErrorDetails is error details.
type ErrorDetails struct {
Code *string `json:"Code,omitempty"`
HTTPStatusCode *string `json:"HttpStatusCode,omitempty"`
Message *string `json:"Message,omitempty"`
Details *string `json:"Details,omitempty"`
}
// EventHubConsumerGroupInfo is the properties of the EventHubConsumerGroupInfo object.
type EventHubConsumerGroupInfo struct {
autorest.Response `json:"-"`
Tags *map[string]*string `json:"tags,omitempty"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
}
// EventHubConsumerGroupsListResult is the JSON-serialized array of Event Hub-compatible consumer group names with a
// next link.
type EventHubConsumerGroupsListResult struct {
autorest.Response `json:"-"`
Value *[]string `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// EventHubConsumerGroupsListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client EventHubConsumerGroupsListResult) EventHubConsumerGroupsListResultPreparer() (*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)))
}
// EventHubProperties is the properties of the provisioned Event Hub-compatible endpoint used by the IoT hub.
type EventHubProperties struct {
RetentionTimeInDays *int64 `json:"retentionTimeInDays,omitempty"`
PartitionCount *int32 `json:"partitionCount,omitempty"`
PartitionIds *[]string `json:"partitionIds,omitempty"`
Path *string `json:"path,omitempty"`
Endpoint *string `json:"endpoint,omitempty"`
}
// ExportDevicesRequest is use to provide parameters when requesting an export of all devices in the IoT hub.
type ExportDevicesRequest struct {
ExportBlobContainerURI *string `json:"ExportBlobContainerUri,omitempty"`
ExcludeKeys *bool `json:"ExcludeKeys,omitempty"`
}
// FallbackRouteProperties is the properties of the fallback route. IoT Hub uses these properties when it routes
// messages to the fallback endpoint.
type FallbackRouteProperties struct {
Source *string `json:"source,omitempty"`
Condition *string `json:"condition,omitempty"`
EndpointNames *[]string `json:"endpointNames,omitempty"`
IsEnabled *bool `json:"isEnabled,omitempty"`
}
// FeedbackProperties is the properties of the feedback queue for cloud-to-device messages.
type FeedbackProperties struct {
LockDurationAsIso8601 *string `json:"lockDurationAsIso8601,omitempty"`
TTLAsIso8601 *string `json:"ttlAsIso8601,omitempty"`
MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"`
}
// ImportDevicesRequest is use to provide parameters when requesting an import of all devices in the hub.
type ImportDevicesRequest struct {
InputBlobContainerURI *string `json:"InputBlobContainerUri,omitempty"`
OutputBlobContainerURI *string `json:"OutputBlobContainerUri,omitempty"`
}
// IotHubCapacity is ioT Hub capacity information.
type IotHubCapacity struct {
Minimum *int64 `json:"minimum,omitempty"`
Maximum *int64 `json:"maximum,omitempty"`
Default *int64 `json:"default,omitempty"`
ScaleType IotHubScaleType `json:"scaleType,omitempty"`
}
// IotHubDescription is the description of the IoT hub.
type IotHubDescription struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
Subscriptionid *string `json:"subscriptionid,omitempty"`
Resourcegroup *string `json:"resourcegroup,omitempty"`
Etag *string `json:"etag,omitempty"`
Properties *IotHubProperties `json:"properties,omitempty"`
Sku *IotHubSkuInfo `json:"sku,omitempty"`
}
// IotHubDescriptionListResult is the JSON-serialized array of IotHubDescription objects with a next link.
type IotHubDescriptionListResult struct {
autorest.Response `json:"-"`
Value *[]IotHubDescription `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// IotHubDescriptionListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client IotHubDescriptionListResult) IotHubDescriptionListResultPreparer() (*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)))
}
// IotHubNameAvailabilityInfo is the properties indicating whether a given IoT hub name is available.
type IotHubNameAvailabilityInfo struct {
autorest.Response `json:"-"`
NameAvailable *bool `json:"nameAvailable,omitempty"`
Reason IotHubNameUnavailabilityReason `json:"reason,omitempty"`
Message *string `json:"message,omitempty"`
}
// IotHubProperties is the properties of an IoT hub.
type IotHubProperties struct {
AuthorizationPolicies *[]SharedAccessSignatureAuthorizationRule `json:"authorizationPolicies,omitempty"`
IPFilterRules *[]IPFilterRule `json:"ipFilterRules,omitempty"`
ProvisioningState *string `json:"provisioningState,omitempty"`
HostName *string `json:"hostName,omitempty"`
EventHubEndpoints *map[string]*EventHubProperties `json:"eventHubEndpoints,omitempty"`
Routing *RoutingProperties `json:"routing,omitempty"`
StorageEndpoints *map[string]*StorageEndpointProperties `json:"storageEndpoints,omitempty"`
MessagingEndpoints *map[string]*MessagingEndpointProperties `json:"messagingEndpoints,omitempty"`
EnableFileUploadNotifications *bool `json:"enableFileUploadNotifications,omitempty"`
CloudToDevice *CloudToDeviceProperties `json:"cloudToDevice,omitempty"`
Comments *string `json:"comments,omitempty"`
OperationsMonitoringProperties *OperationsMonitoringProperties `json:"operationsMonitoringProperties,omitempty"`
Features Capabilities `json:"features,omitempty"`
}
// IotHubQuotaMetricInfo is quota metrics properties.
type IotHubQuotaMetricInfo struct {
Name *string `json:"Name,omitempty"`
CurrentValue *int64 `json:"CurrentValue,omitempty"`
MaxValue *int64 `json:"MaxValue,omitempty"`
}
// IotHubQuotaMetricInfoListResult is the JSON-serialized array of IotHubQuotaMetricInfo objects with a next link.
type IotHubQuotaMetricInfoListResult struct {
autorest.Response `json:"-"`
Value *[]IotHubQuotaMetricInfo `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// IotHubQuotaMetricInfoListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client IotHubQuotaMetricInfoListResult) IotHubQuotaMetricInfoListResultPreparer() (*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)))
}
// IotHubSkuDescription is SKU properties.
type IotHubSkuDescription struct {
ResourceType *string `json:"resourceType,omitempty"`
Sku *IotHubSkuInfo `json:"sku,omitempty"`
Capacity *IotHubCapacity `json:"capacity,omitempty"`
}
// IotHubSkuDescriptionListResult is the JSON-serialized array of IotHubSkuDescription objects with a next link.
type IotHubSkuDescriptionListResult struct {
autorest.Response `json:"-"`
Value *[]IotHubSkuDescription `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// IotHubSkuDescriptionListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client IotHubSkuDescriptionListResult) IotHubSkuDescriptionListResultPreparer() (*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)))
}
// IotHubSkuInfo is information about the SKU of the IoT hub.
type IotHubSkuInfo struct {
Name IotHubSku `json:"name,omitempty"`
Tier IotHubSkuTier `json:"tier,omitempty"`
Capacity *int64 `json:"capacity,omitempty"`
}
// IPFilterRule is the IP filter rules for the IoT hub.
type IPFilterRule struct {
FilterName *string `json:"filterName,omitempty"`
Action IPFilterActionType `json:"action,omitempty"`
IPMask *string `json:"ipMask,omitempty"`
}
// JobResponse is the properties of the Job Response object.
type JobResponse struct {
autorest.Response `json:"-"`
JobID *string `json:"jobId,omitempty"`
StartTimeUtc *date.TimeRFC1123 `json:"startTimeUtc,omitempty"`
EndTimeUtc *date.TimeRFC1123 `json:"endTimeUtc,omitempty"`
Type JobType `json:"type,omitempty"`
Status JobStatus `json:"status,omitempty"`
FailureReason *string `json:"failureReason,omitempty"`
StatusMessage *string `json:"statusMessage,omitempty"`
ParentJobID *string `json:"parentJobId,omitempty"`
}
// JobResponseListResult is the JSON-serialized array of JobResponse objects with a next link.
type JobResponseListResult struct {
autorest.Response `json:"-"`
Value *[]JobResponse `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// JobResponseListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client JobResponseListResult) JobResponseListResultPreparer() (*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)))
}
// MessagingEndpointProperties is the properties of the messaging endpoints used by this IoT hub.
type MessagingEndpointProperties struct {
LockDurationAsIso8601 *string `json:"lockDurationAsIso8601,omitempty"`
TTLAsIso8601 *string `json:"ttlAsIso8601,omitempty"`
MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"`
}
// Operation is ioT Hub REST API operation
type Operation struct {
Name *string `json:"name,omitempty"`
Display *OperationDisplay `json:"display,omitempty"`
}
// OperationDisplay is the object that represents the operation.
type OperationDisplay struct {
Provider *string `json:"provider,omitempty"`
Resource *string `json:"resource,omitempty"`
Operation *string `json:"operation,omitempty"`
}
// OperationInputs is input values.
type OperationInputs struct {
Name *string `json:"Name,omitempty"`
}
// OperationListResult is result of the request to list IoT Hub operations. It contains a list of operations and a URL
// link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
Value *[]Operation `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client OperationListResult) OperationListResultPreparer() (*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)))
}
// OperationsMonitoringProperties is the operations monitoring properties for the IoT hub. The possible keys to the
// dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations, Routes,
// D2CTwinOperations, C2DTwinOperations, TwinQueries, JobsOperations, DirectMethods.
type OperationsMonitoringProperties struct {
Events *map[string]*OperationMonitoringLevel `json:"events,omitempty"`
}
// RegistryStatistics is identity registry statistics.
type RegistryStatistics struct {
autorest.Response `json:"-"`
TotalDeviceCount *int64 `json:"totalDeviceCount,omitempty"`
EnabledDeviceCount *int64 `json:"enabledDeviceCount,omitempty"`
DisabledDeviceCount *int64 `json:"disabledDeviceCount,omitempty"`
}
// Resource is the common properties of an Azure resource.
type Resource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
}
// RouteProperties is the properties of a routing rule that your IoT hub uses to route messages to endpoints.
type RouteProperties struct {
Name *string `json:"name,omitempty"`
Source RoutingSource `json:"source,omitempty"`
Condition *string `json:"condition,omitempty"`
EndpointNames *[]string `json:"endpointNames,omitempty"`
IsEnabled *bool `json:"isEnabled,omitempty"`
}
// RoutingEndpoints is the properties related to the custom endpoints to which your IoT hub routes messages based on
// the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1
// custom endpoint is allowed across all endpoint types for free hubs.
type RoutingEndpoints struct {
ServiceBusQueues *[]RoutingServiceBusQueueEndpointProperties `json:"serviceBusQueues,omitempty"`
ServiceBusTopics *[]RoutingServiceBusTopicEndpointProperties `json:"serviceBusTopics,omitempty"`
EventHubs *[]RoutingEventHubProperties `json:"eventHubs,omitempty"`
StorageContainers *[]RoutingStorageContainerProperties `json:"storageContainers,omitempty"`
}
// RoutingEventHubProperties is the properties related to an event hub endpoint.
type RoutingEventHubProperties struct {
ConnectionString *string `json:"connectionString,omitempty"`
Name *string `json:"name,omitempty"`
SubscriptionID *string `json:"subscriptionId,omitempty"`
ResourceGroup *string `json:"resourceGroup,omitempty"`
}
// RoutingProperties is the routing related properties of the IoT hub. See:
// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging
type RoutingProperties struct {
Endpoints *RoutingEndpoints `json:"endpoints,omitempty"`
Routes *[]RouteProperties `json:"routes,omitempty"`
FallbackRoute *FallbackRouteProperties `json:"fallbackRoute,omitempty"`
}
// RoutingServiceBusQueueEndpointProperties is the properties related to service bus queue endpoint types.
type RoutingServiceBusQueueEndpointProperties struct {
ConnectionString *string `json:"connectionString,omitempty"`
Name *string `json:"name,omitempty"`
SubscriptionID *string `json:"subscriptionId,omitempty"`
ResourceGroup *string `json:"resourceGroup,omitempty"`
}
// RoutingServiceBusTopicEndpointProperties is the properties related to service bus topic endpoint types.
type RoutingServiceBusTopicEndpointProperties struct {
ConnectionString *string `json:"connectionString,omitempty"`
Name *string `json:"name,omitempty"`
SubscriptionID *string `json:"subscriptionId,omitempty"`
ResourceGroup *string `json:"resourceGroup,omitempty"`
}
// RoutingStorageContainerProperties is the properties related to a storage container endpoint.
type RoutingStorageContainerProperties struct {
ConnectionString *string `json:"connectionString,omitempty"`
Name *string `json:"name,omitempty"`
SubscriptionID *string `json:"subscriptionId,omitempty"`
ResourceGroup *string `json:"resourceGroup,omitempty"`
ContainerName *string `json:"containerName,omitempty"`
FileNameFormat *string `json:"fileNameFormat,omitempty"`
BatchFrequencyInSeconds *int32 `json:"batchFrequencyInSeconds,omitempty"`
MaxChunkSizeInBytes *int32 `json:"maxChunkSizeInBytes,omitempty"`
Encoding *string `json:"encoding,omitempty"`
}
// SetObject is
type SetObject struct {
autorest.Response `json:"-"`
Value *map[string]interface{} `json:"value,omitempty"`
}
// SharedAccessSignatureAuthorizationRule is the properties of an IoT hub shared access policy.
type SharedAccessSignatureAuthorizationRule struct {
autorest.Response `json:"-"`
KeyName *string `json:"keyName,omitempty"`
PrimaryKey *string `json:"primaryKey,omitempty"`
SecondaryKey *string `json:"secondaryKey,omitempty"`
Rights AccessRights `json:"rights,omitempty"`
}
// SharedAccessSignatureAuthorizationRuleListResult is the list of shared access policies with a next link.
type SharedAccessSignatureAuthorizationRuleListResult struct {
autorest.Response `json:"-"`
Value *[]SharedAccessSignatureAuthorizationRule `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// SharedAccessSignatureAuthorizationRuleListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client SharedAccessSignatureAuthorizationRuleListResult) SharedAccessSignatureAuthorizationRuleListResultPreparer() (*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)))
}
// StorageEndpointProperties is the properties of the Azure Storage endpoint for file upload.
type StorageEndpointProperties struct {
SasTTLAsIso8601 *string `json:"sasTtlAsIso8601,omitempty"`
ConnectionString *string `json:"connectionString,omitempty"`
ContainerName *string `json:"containerName,omitempty"`
}