1 package devices
2
3
4
5
6
7
8
9 import (
10 "context"
11 "encoding/json"
12 "github.com/Azure/go-autorest/autorest"
13 "github.com/Azure/go-autorest/autorest/azure"
14 "github.com/Azure/go-autorest/autorest/date"
15 "github.com/Azure/go-autorest/autorest/to"
16 "github.com/Azure/go-autorest/tracing"
17 "net/http"
18 )
19
20
21 const fqdn = "github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices"
22
23
24 type CertificateBodyDescription struct {
25
26 Certificate *string `json:"certificate,omitempty"`
27 }
28
29
30 type CertificateDescription struct {
31 autorest.Response `json:"-"`
32 Properties *CertificateProperties `json:"properties,omitempty"`
33
34 ID *string `json:"id,omitempty"`
35
36 Name *string `json:"name,omitempty"`
37
38 Etag *string `json:"etag,omitempty"`
39
40 Type *string `json:"type,omitempty"`
41 }
42
43
44 func (cd CertificateDescription) MarshalJSON() ([]byte, error) {
45 objectMap := make(map[string]interface{})
46 if cd.Properties != nil {
47 objectMap["properties"] = cd.Properties
48 }
49 return json.Marshal(objectMap)
50 }
51
52
53 type CertificateListDescription struct {
54 autorest.Response `json:"-"`
55
56 Value *[]CertificateDescription `json:"value,omitempty"`
57 }
58
59
60 type CertificateProperties struct {
61
62 Subject *string `json:"subject,omitempty"`
63
64 Expiry *date.TimeRFC1123 `json:"expiry,omitempty"`
65
66 Thumbprint *string `json:"thumbprint,omitempty"`
67
68 IsVerified *bool `json:"isVerified,omitempty"`
69
70 Created *date.TimeRFC1123 `json:"created,omitempty"`
71
72 Updated *date.TimeRFC1123 `json:"updated,omitempty"`
73
74 Certificate *string `json:"certificate,omitempty"`
75 }
76
77
78 func (cp CertificateProperties) MarshalJSON() ([]byte, error) {
79 objectMap := make(map[string]interface{})
80 if cp.Certificate != nil {
81 objectMap["certificate"] = cp.Certificate
82 }
83 return json.Marshal(objectMap)
84 }
85
86
87
88 type CertificatePropertiesWithNonce struct {
89
90 Subject *string `json:"subject,omitempty"`
91
92 Expiry *date.TimeRFC1123 `json:"expiry,omitempty"`
93
94 Thumbprint *string `json:"thumbprint,omitempty"`
95
96 IsVerified *bool `json:"isVerified,omitempty"`
97
98 Created *date.TimeRFC1123 `json:"created,omitempty"`
99
100 Updated *date.TimeRFC1123 `json:"updated,omitempty"`
101
102 VerificationCode *string `json:"verificationCode,omitempty"`
103
104 Certificate *string `json:"certificate,omitempty"`
105 }
106
107
108 func (cpwn CertificatePropertiesWithNonce) MarshalJSON() ([]byte, error) {
109 objectMap := make(map[string]interface{})
110 return json.Marshal(objectMap)
111 }
112
113
114 type CertificateVerificationDescription struct {
115
116 Certificate *string `json:"certificate,omitempty"`
117 }
118
119
120 type CertificateWithNonceDescription struct {
121 autorest.Response `json:"-"`
122 Properties *CertificatePropertiesWithNonce `json:"properties,omitempty"`
123
124 ID *string `json:"id,omitempty"`
125
126 Name *string `json:"name,omitempty"`
127
128 Etag *string `json:"etag,omitempty"`
129
130 Type *string `json:"type,omitempty"`
131 }
132
133
134 func (cwnd CertificateWithNonceDescription) MarshalJSON() ([]byte, error) {
135 objectMap := make(map[string]interface{})
136 if cwnd.Properties != nil {
137 objectMap["properties"] = cwnd.Properties
138 }
139 return json.Marshal(objectMap)
140 }
141
142
143 type CloudToDeviceProperties struct {
144
145 MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"`
146
147 DefaultTTLAsIso8601 *string `json:"defaultTtlAsIso8601,omitempty"`
148 Feedback *FeedbackProperties `json:"feedback,omitempty"`
149 }
150
151
152 type EndpointHealthData struct {
153
154 EndpointID *string `json:"endpointId,omitempty"`
155
156 HealthStatus EndpointHealthStatus `json:"healthStatus,omitempty"`
157 }
158
159
160 type EndpointHealthDataListResult struct {
161 autorest.Response `json:"-"`
162
163 Value *[]EndpointHealthData `json:"value,omitempty"`
164
165 NextLink *string `json:"nextLink,omitempty"`
166 }
167
168
169 func (ehdlr EndpointHealthDataListResult) MarshalJSON() ([]byte, error) {
170 objectMap := make(map[string]interface{})
171 if ehdlr.Value != nil {
172 objectMap["value"] = ehdlr.Value
173 }
174 return json.Marshal(objectMap)
175 }
176
177
178 type EndpointHealthDataListResultIterator struct {
179 i int
180 page EndpointHealthDataListResultPage
181 }
182
183
184
185 func (iter *EndpointHealthDataListResultIterator) NextWithContext(ctx context.Context) (err error) {
186 if tracing.IsEnabled() {
187 ctx = tracing.StartSpan(ctx, fqdn+"/EndpointHealthDataListResultIterator.NextWithContext")
188 defer func() {
189 sc := -1
190 if iter.Response().Response.Response != nil {
191 sc = iter.Response().Response.Response.StatusCode
192 }
193 tracing.EndSpan(ctx, sc, err)
194 }()
195 }
196 iter.i++
197 if iter.i < len(iter.page.Values()) {
198 return nil
199 }
200 err = iter.page.NextWithContext(ctx)
201 if err != nil {
202 iter.i--
203 return err
204 }
205 iter.i = 0
206 return nil
207 }
208
209
210
211
212 func (iter *EndpointHealthDataListResultIterator) Next() error {
213 return iter.NextWithContext(context.Background())
214 }
215
216
217 func (iter EndpointHealthDataListResultIterator) NotDone() bool {
218 return iter.page.NotDone() && iter.i < len(iter.page.Values())
219 }
220
221
222 func (iter EndpointHealthDataListResultIterator) Response() EndpointHealthDataListResult {
223 return iter.page.Response()
224 }
225
226
227
228 func (iter EndpointHealthDataListResultIterator) Value() EndpointHealthData {
229 if !iter.page.NotDone() {
230 return EndpointHealthData{}
231 }
232 return iter.page.Values()[iter.i]
233 }
234
235
236 func NewEndpointHealthDataListResultIterator(page EndpointHealthDataListResultPage) EndpointHealthDataListResultIterator {
237 return EndpointHealthDataListResultIterator{page: page}
238 }
239
240
241 func (ehdlr EndpointHealthDataListResult) IsEmpty() bool {
242 return ehdlr.Value == nil || len(*ehdlr.Value) == 0
243 }
244
245
246 func (ehdlr EndpointHealthDataListResult) hasNextLink() bool {
247 return ehdlr.NextLink != nil && len(*ehdlr.NextLink) != 0
248 }
249
250
251
252 func (ehdlr EndpointHealthDataListResult) endpointHealthDataListResultPreparer(ctx context.Context) (*http.Request, error) {
253 if !ehdlr.hasNextLink() {
254 return nil, nil
255 }
256 return autorest.Prepare((&http.Request{}).WithContext(ctx),
257 autorest.AsJSON(),
258 autorest.AsGet(),
259 autorest.WithBaseURL(to.String(ehdlr.NextLink)))
260 }
261
262
263 type EndpointHealthDataListResultPage struct {
264 fn func(context.Context, EndpointHealthDataListResult) (EndpointHealthDataListResult, error)
265 ehdlr EndpointHealthDataListResult
266 }
267
268
269
270 func (page *EndpointHealthDataListResultPage) NextWithContext(ctx context.Context) (err error) {
271 if tracing.IsEnabled() {
272 ctx = tracing.StartSpan(ctx, fqdn+"/EndpointHealthDataListResultPage.NextWithContext")
273 defer func() {
274 sc := -1
275 if page.Response().Response.Response != nil {
276 sc = page.Response().Response.Response.StatusCode
277 }
278 tracing.EndSpan(ctx, sc, err)
279 }()
280 }
281 for {
282 next, err := page.fn(ctx, page.ehdlr)
283 if err != nil {
284 return err
285 }
286 page.ehdlr = next
287 if !next.hasNextLink() || !next.IsEmpty() {
288 break
289 }
290 }
291 return nil
292 }
293
294
295
296
297 func (page *EndpointHealthDataListResultPage) Next() error {
298 return page.NextWithContext(context.Background())
299 }
300
301
302 func (page EndpointHealthDataListResultPage) NotDone() bool {
303 return !page.ehdlr.IsEmpty()
304 }
305
306
307 func (page EndpointHealthDataListResultPage) Response() EndpointHealthDataListResult {
308 return page.ehdlr
309 }
310
311
312 func (page EndpointHealthDataListResultPage) Values() []EndpointHealthData {
313 if page.ehdlr.IsEmpty() {
314 return nil
315 }
316 return *page.ehdlr.Value
317 }
318
319
320 func NewEndpointHealthDataListResultPage(cur EndpointHealthDataListResult, getNextPage func(context.Context, EndpointHealthDataListResult) (EndpointHealthDataListResult, error)) EndpointHealthDataListResultPage {
321 return EndpointHealthDataListResultPage{
322 fn: getNextPage,
323 ehdlr: cur,
324 }
325 }
326
327
328 type ErrorDetails struct {
329
330 Code *string `json:"code,omitempty"`
331
332 HTTPStatusCode *string `json:"httpStatusCode,omitempty"`
333
334 Message *string `json:"message,omitempty"`
335
336 Details *string `json:"details,omitempty"`
337 }
338
339
340 func (ed ErrorDetails) MarshalJSON() ([]byte, error) {
341 objectMap := make(map[string]interface{})
342 return json.Marshal(objectMap)
343 }
344
345
346 type EventHubConsumerGroupInfo struct {
347 autorest.Response `json:"-"`
348
349 Properties map[string]*string `json:"properties"`
350
351 ID *string `json:"id,omitempty"`
352
353 Name *string `json:"name,omitempty"`
354
355 Type *string `json:"type,omitempty"`
356
357 Etag *string `json:"etag,omitempty"`
358 }
359
360
361 func (ehcgi EventHubConsumerGroupInfo) MarshalJSON() ([]byte, error) {
362 objectMap := make(map[string]interface{})
363 if ehcgi.Properties != nil {
364 objectMap["properties"] = ehcgi.Properties
365 }
366 return json.Marshal(objectMap)
367 }
368
369
370
371 type EventHubConsumerGroupsListResult struct {
372 autorest.Response `json:"-"`
373
374 Value *[]EventHubConsumerGroupInfo `json:"value,omitempty"`
375
376 NextLink *string `json:"nextLink,omitempty"`
377 }
378
379
380 func (ehcglr EventHubConsumerGroupsListResult) MarshalJSON() ([]byte, error) {
381 objectMap := make(map[string]interface{})
382 if ehcglr.Value != nil {
383 objectMap["value"] = ehcglr.Value
384 }
385 return json.Marshal(objectMap)
386 }
387
388
389
390 type EventHubConsumerGroupsListResultIterator struct {
391 i int
392 page EventHubConsumerGroupsListResultPage
393 }
394
395
396
397 func (iter *EventHubConsumerGroupsListResultIterator) NextWithContext(ctx context.Context) (err error) {
398 if tracing.IsEnabled() {
399 ctx = tracing.StartSpan(ctx, fqdn+"/EventHubConsumerGroupsListResultIterator.NextWithContext")
400 defer func() {
401 sc := -1
402 if iter.Response().Response.Response != nil {
403 sc = iter.Response().Response.Response.StatusCode
404 }
405 tracing.EndSpan(ctx, sc, err)
406 }()
407 }
408 iter.i++
409 if iter.i < len(iter.page.Values()) {
410 return nil
411 }
412 err = iter.page.NextWithContext(ctx)
413 if err != nil {
414 iter.i--
415 return err
416 }
417 iter.i = 0
418 return nil
419 }
420
421
422
423
424 func (iter *EventHubConsumerGroupsListResultIterator) Next() error {
425 return iter.NextWithContext(context.Background())
426 }
427
428
429 func (iter EventHubConsumerGroupsListResultIterator) NotDone() bool {
430 return iter.page.NotDone() && iter.i < len(iter.page.Values())
431 }
432
433
434 func (iter EventHubConsumerGroupsListResultIterator) Response() EventHubConsumerGroupsListResult {
435 return iter.page.Response()
436 }
437
438
439
440 func (iter EventHubConsumerGroupsListResultIterator) Value() EventHubConsumerGroupInfo {
441 if !iter.page.NotDone() {
442 return EventHubConsumerGroupInfo{}
443 }
444 return iter.page.Values()[iter.i]
445 }
446
447
448 func NewEventHubConsumerGroupsListResultIterator(page EventHubConsumerGroupsListResultPage) EventHubConsumerGroupsListResultIterator {
449 return EventHubConsumerGroupsListResultIterator{page: page}
450 }
451
452
453 func (ehcglr EventHubConsumerGroupsListResult) IsEmpty() bool {
454 return ehcglr.Value == nil || len(*ehcglr.Value) == 0
455 }
456
457
458 func (ehcglr EventHubConsumerGroupsListResult) hasNextLink() bool {
459 return ehcglr.NextLink != nil && len(*ehcglr.NextLink) != 0
460 }
461
462
463
464 func (ehcglr EventHubConsumerGroupsListResult) eventHubConsumerGroupsListResultPreparer(ctx context.Context) (*http.Request, error) {
465 if !ehcglr.hasNextLink() {
466 return nil, nil
467 }
468 return autorest.Prepare((&http.Request{}).WithContext(ctx),
469 autorest.AsJSON(),
470 autorest.AsGet(),
471 autorest.WithBaseURL(to.String(ehcglr.NextLink)))
472 }
473
474
475 type EventHubConsumerGroupsListResultPage struct {
476 fn func(context.Context, EventHubConsumerGroupsListResult) (EventHubConsumerGroupsListResult, error)
477 ehcglr EventHubConsumerGroupsListResult
478 }
479
480
481
482 func (page *EventHubConsumerGroupsListResultPage) NextWithContext(ctx context.Context) (err error) {
483 if tracing.IsEnabled() {
484 ctx = tracing.StartSpan(ctx, fqdn+"/EventHubConsumerGroupsListResultPage.NextWithContext")
485 defer func() {
486 sc := -1
487 if page.Response().Response.Response != nil {
488 sc = page.Response().Response.Response.StatusCode
489 }
490 tracing.EndSpan(ctx, sc, err)
491 }()
492 }
493 for {
494 next, err := page.fn(ctx, page.ehcglr)
495 if err != nil {
496 return err
497 }
498 page.ehcglr = next
499 if !next.hasNextLink() || !next.IsEmpty() {
500 break
501 }
502 }
503 return nil
504 }
505
506
507
508
509 func (page *EventHubConsumerGroupsListResultPage) Next() error {
510 return page.NextWithContext(context.Background())
511 }
512
513
514 func (page EventHubConsumerGroupsListResultPage) NotDone() bool {
515 return !page.ehcglr.IsEmpty()
516 }
517
518
519 func (page EventHubConsumerGroupsListResultPage) Response() EventHubConsumerGroupsListResult {
520 return page.ehcglr
521 }
522
523
524 func (page EventHubConsumerGroupsListResultPage) Values() []EventHubConsumerGroupInfo {
525 if page.ehcglr.IsEmpty() {
526 return nil
527 }
528 return *page.ehcglr.Value
529 }
530
531
532 func NewEventHubConsumerGroupsListResultPage(cur EventHubConsumerGroupsListResult, getNextPage func(context.Context, EventHubConsumerGroupsListResult) (EventHubConsumerGroupsListResult, error)) EventHubConsumerGroupsListResultPage {
533 return EventHubConsumerGroupsListResultPage{
534 fn: getNextPage,
535 ehcglr: cur,
536 }
537 }
538
539
540 type EventHubProperties struct {
541
542 RetentionTimeInDays *int64 `json:"retentionTimeInDays,omitempty"`
543
544 PartitionCount *int32 `json:"partitionCount,omitempty"`
545
546 PartitionIds *[]string `json:"partitionIds,omitempty"`
547
548 Path *string `json:"path,omitempty"`
549
550 Endpoint *string `json:"endpoint,omitempty"`
551 }
552
553
554 func (ehp EventHubProperties) MarshalJSON() ([]byte, error) {
555 objectMap := make(map[string]interface{})
556 if ehp.RetentionTimeInDays != nil {
557 objectMap["retentionTimeInDays"] = ehp.RetentionTimeInDays
558 }
559 if ehp.PartitionCount != nil {
560 objectMap["partitionCount"] = ehp.PartitionCount
561 }
562 return json.Marshal(objectMap)
563 }
564
565
566 type ExportDevicesRequest struct {
567
568 ExportBlobContainerURI *string `json:"exportBlobContainerUri,omitempty"`
569
570 ExcludeKeys *bool `json:"excludeKeys,omitempty"`
571 }
572
573
574
575 type FallbackRouteProperties struct {
576
577 Name *string `json:"name,omitempty"`
578
579 Source *string `json:"source,omitempty"`
580
581 Condition *string `json:"condition,omitempty"`
582
583 EndpointNames *[]string `json:"endpointNames,omitempty"`
584
585 IsEnabled *bool `json:"isEnabled,omitempty"`
586 }
587
588
589 type FeedbackProperties struct {
590
591 LockDurationAsIso8601 *string `json:"lockDurationAsIso8601,omitempty"`
592
593 TTLAsIso8601 *string `json:"ttlAsIso8601,omitempty"`
594
595 MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"`
596 }
597
598
599 type ImportDevicesRequest struct {
600
601 InputBlobContainerURI *string `json:"inputBlobContainerUri,omitempty"`
602
603 OutputBlobContainerURI *string `json:"outputBlobContainerUri,omitempty"`
604 }
605
606
607 type IotHubCapacity struct {
608
609 Minimum *int64 `json:"minimum,omitempty"`
610
611 Maximum *int64 `json:"maximum,omitempty"`
612
613 Default *int64 `json:"default,omitempty"`
614
615 ScaleType IotHubScaleType `json:"scaleType,omitempty"`
616 }
617
618
619 func (ihc IotHubCapacity) MarshalJSON() ([]byte, error) {
620 objectMap := make(map[string]interface{})
621 return json.Marshal(objectMap)
622 }
623
624
625 type IotHubDescription struct {
626 autorest.Response `json:"-"`
627
628 Etag *string `json:"etag,omitempty"`
629
630 Properties *IotHubProperties `json:"properties,omitempty"`
631
632 Sku *IotHubSkuInfo `json:"sku,omitempty"`
633
634 ID *string `json:"id,omitempty"`
635
636 Name *string `json:"name,omitempty"`
637
638 Type *string `json:"type,omitempty"`
639
640 Location *string `json:"location,omitempty"`
641
642 Tags map[string]*string `json:"tags"`
643 }
644
645
646 func (ihd IotHubDescription) MarshalJSON() ([]byte, error) {
647 objectMap := make(map[string]interface{})
648 if ihd.Etag != nil {
649 objectMap["etag"] = ihd.Etag
650 }
651 if ihd.Properties != nil {
652 objectMap["properties"] = ihd.Properties
653 }
654 if ihd.Sku != nil {
655 objectMap["sku"] = ihd.Sku
656 }
657 if ihd.Location != nil {
658 objectMap["location"] = ihd.Location
659 }
660 if ihd.Tags != nil {
661 objectMap["tags"] = ihd.Tags
662 }
663 return json.Marshal(objectMap)
664 }
665
666
667 type IotHubDescriptionListResult struct {
668 autorest.Response `json:"-"`
669
670 Value *[]IotHubDescription `json:"value,omitempty"`
671
672 NextLink *string `json:"nextLink,omitempty"`
673 }
674
675
676 func (ihdlr IotHubDescriptionListResult) MarshalJSON() ([]byte, error) {
677 objectMap := make(map[string]interface{})
678 if ihdlr.Value != nil {
679 objectMap["value"] = ihdlr.Value
680 }
681 return json.Marshal(objectMap)
682 }
683
684
685 type IotHubDescriptionListResultIterator struct {
686 i int
687 page IotHubDescriptionListResultPage
688 }
689
690
691
692 func (iter *IotHubDescriptionListResultIterator) NextWithContext(ctx context.Context) (err error) {
693 if tracing.IsEnabled() {
694 ctx = tracing.StartSpan(ctx, fqdn+"/IotHubDescriptionListResultIterator.NextWithContext")
695 defer func() {
696 sc := -1
697 if iter.Response().Response.Response != nil {
698 sc = iter.Response().Response.Response.StatusCode
699 }
700 tracing.EndSpan(ctx, sc, err)
701 }()
702 }
703 iter.i++
704 if iter.i < len(iter.page.Values()) {
705 return nil
706 }
707 err = iter.page.NextWithContext(ctx)
708 if err != nil {
709 iter.i--
710 return err
711 }
712 iter.i = 0
713 return nil
714 }
715
716
717
718
719 func (iter *IotHubDescriptionListResultIterator) Next() error {
720 return iter.NextWithContext(context.Background())
721 }
722
723
724 func (iter IotHubDescriptionListResultIterator) NotDone() bool {
725 return iter.page.NotDone() && iter.i < len(iter.page.Values())
726 }
727
728
729 func (iter IotHubDescriptionListResultIterator) Response() IotHubDescriptionListResult {
730 return iter.page.Response()
731 }
732
733
734
735 func (iter IotHubDescriptionListResultIterator) Value() IotHubDescription {
736 if !iter.page.NotDone() {
737 return IotHubDescription{}
738 }
739 return iter.page.Values()[iter.i]
740 }
741
742
743 func NewIotHubDescriptionListResultIterator(page IotHubDescriptionListResultPage) IotHubDescriptionListResultIterator {
744 return IotHubDescriptionListResultIterator{page: page}
745 }
746
747
748 func (ihdlr IotHubDescriptionListResult) IsEmpty() bool {
749 return ihdlr.Value == nil || len(*ihdlr.Value) == 0
750 }
751
752
753 func (ihdlr IotHubDescriptionListResult) hasNextLink() bool {
754 return ihdlr.NextLink != nil && len(*ihdlr.NextLink) != 0
755 }
756
757
758
759 func (ihdlr IotHubDescriptionListResult) iotHubDescriptionListResultPreparer(ctx context.Context) (*http.Request, error) {
760 if !ihdlr.hasNextLink() {
761 return nil, nil
762 }
763 return autorest.Prepare((&http.Request{}).WithContext(ctx),
764 autorest.AsJSON(),
765 autorest.AsGet(),
766 autorest.WithBaseURL(to.String(ihdlr.NextLink)))
767 }
768
769
770 type IotHubDescriptionListResultPage struct {
771 fn func(context.Context, IotHubDescriptionListResult) (IotHubDescriptionListResult, error)
772 ihdlr IotHubDescriptionListResult
773 }
774
775
776
777 func (page *IotHubDescriptionListResultPage) NextWithContext(ctx context.Context) (err error) {
778 if tracing.IsEnabled() {
779 ctx = tracing.StartSpan(ctx, fqdn+"/IotHubDescriptionListResultPage.NextWithContext")
780 defer func() {
781 sc := -1
782 if page.Response().Response.Response != nil {
783 sc = page.Response().Response.Response.StatusCode
784 }
785 tracing.EndSpan(ctx, sc, err)
786 }()
787 }
788 for {
789 next, err := page.fn(ctx, page.ihdlr)
790 if err != nil {
791 return err
792 }
793 page.ihdlr = next
794 if !next.hasNextLink() || !next.IsEmpty() {
795 break
796 }
797 }
798 return nil
799 }
800
801
802
803
804 func (page *IotHubDescriptionListResultPage) Next() error {
805 return page.NextWithContext(context.Background())
806 }
807
808
809 func (page IotHubDescriptionListResultPage) NotDone() bool {
810 return !page.ihdlr.IsEmpty()
811 }
812
813
814 func (page IotHubDescriptionListResultPage) Response() IotHubDescriptionListResult {
815 return page.ihdlr
816 }
817
818
819 func (page IotHubDescriptionListResultPage) Values() []IotHubDescription {
820 if page.ihdlr.IsEmpty() {
821 return nil
822 }
823 return *page.ihdlr.Value
824 }
825
826
827 func NewIotHubDescriptionListResultPage(cur IotHubDescriptionListResult, getNextPage func(context.Context, IotHubDescriptionListResult) (IotHubDescriptionListResult, error)) IotHubDescriptionListResultPage {
828 return IotHubDescriptionListResultPage{
829 fn: getNextPage,
830 ihdlr: cur,
831 }
832 }
833
834
835 type IotHubNameAvailabilityInfo struct {
836 autorest.Response `json:"-"`
837
838 NameAvailable *bool `json:"nameAvailable,omitempty"`
839
840 Reason IotHubNameUnavailabilityReason `json:"reason,omitempty"`
841
842 Message *string `json:"message,omitempty"`
843 }
844
845
846 func (ihnai IotHubNameAvailabilityInfo) MarshalJSON() ([]byte, error) {
847 objectMap := make(map[string]interface{})
848 if ihnai.Message != nil {
849 objectMap["message"] = ihnai.Message
850 }
851 return json.Marshal(objectMap)
852 }
853
854
855 type IotHubProperties struct {
856
857 AuthorizationPolicies *[]SharedAccessSignatureAuthorizationRule `json:"authorizationPolicies,omitempty"`
858
859 IPFilterRules *[]IPFilterRule `json:"ipFilterRules,omitempty"`
860
861 ProvisioningState *string `json:"provisioningState,omitempty"`
862
863 State *string `json:"state,omitempty"`
864
865 HostName *string `json:"hostName,omitempty"`
866
867 EventHubEndpoints map[string]*EventHubProperties `json:"eventHubEndpoints"`
868 Routing *RoutingProperties `json:"routing,omitempty"`
869
870 StorageEndpoints map[string]*StorageEndpointProperties `json:"storageEndpoints"`
871
872 MessagingEndpoints map[string]*MessagingEndpointProperties `json:"messagingEndpoints"`
873
874 EnableFileUploadNotifications *bool `json:"enableFileUploadNotifications,omitempty"`
875 CloudToDevice *CloudToDeviceProperties `json:"cloudToDevice,omitempty"`
876
877 Comments *string `json:"comments,omitempty"`
878 OperationsMonitoringProperties *OperationsMonitoringProperties `json:"operationsMonitoringProperties,omitempty"`
879
880 Features Capabilities `json:"features,omitempty"`
881 }
882
883
884 func (ihp IotHubProperties) MarshalJSON() ([]byte, error) {
885 objectMap := make(map[string]interface{})
886 if ihp.AuthorizationPolicies != nil {
887 objectMap["authorizationPolicies"] = ihp.AuthorizationPolicies
888 }
889 if ihp.IPFilterRules != nil {
890 objectMap["ipFilterRules"] = ihp.IPFilterRules
891 }
892 if ihp.EventHubEndpoints != nil {
893 objectMap["eventHubEndpoints"] = ihp.EventHubEndpoints
894 }
895 if ihp.Routing != nil {
896 objectMap["routing"] = ihp.Routing
897 }
898 if ihp.StorageEndpoints != nil {
899 objectMap["storageEndpoints"] = ihp.StorageEndpoints
900 }
901 if ihp.MessagingEndpoints != nil {
902 objectMap["messagingEndpoints"] = ihp.MessagingEndpoints
903 }
904 if ihp.EnableFileUploadNotifications != nil {
905 objectMap["enableFileUploadNotifications"] = ihp.EnableFileUploadNotifications
906 }
907 if ihp.CloudToDevice != nil {
908 objectMap["cloudToDevice"] = ihp.CloudToDevice
909 }
910 if ihp.Comments != nil {
911 objectMap["comments"] = ihp.Comments
912 }
913 if ihp.OperationsMonitoringProperties != nil {
914 objectMap["operationsMonitoringProperties"] = ihp.OperationsMonitoringProperties
915 }
916 if ihp.Features != "" {
917 objectMap["features"] = ihp.Features
918 }
919 return json.Marshal(objectMap)
920 }
921
922
923 type IotHubQuotaMetricInfo struct {
924
925 Name *string `json:"name,omitempty"`
926
927 CurrentValue *int64 `json:"currentValue,omitempty"`
928
929 MaxValue *int64 `json:"maxValue,omitempty"`
930 }
931
932
933 func (ihqmi IotHubQuotaMetricInfo) MarshalJSON() ([]byte, error) {
934 objectMap := make(map[string]interface{})
935 return json.Marshal(objectMap)
936 }
937
938
939
940 type IotHubQuotaMetricInfoListResult struct {
941 autorest.Response `json:"-"`
942
943 Value *[]IotHubQuotaMetricInfo `json:"value,omitempty"`
944
945 NextLink *string `json:"nextLink,omitempty"`
946 }
947
948
949 func (ihqmilr IotHubQuotaMetricInfoListResult) MarshalJSON() ([]byte, error) {
950 objectMap := make(map[string]interface{})
951 if ihqmilr.Value != nil {
952 objectMap["value"] = ihqmilr.Value
953 }
954 return json.Marshal(objectMap)
955 }
956
957
958
959 type IotHubQuotaMetricInfoListResultIterator struct {
960 i int
961 page IotHubQuotaMetricInfoListResultPage
962 }
963
964
965
966 func (iter *IotHubQuotaMetricInfoListResultIterator) NextWithContext(ctx context.Context) (err error) {
967 if tracing.IsEnabled() {
968 ctx = tracing.StartSpan(ctx, fqdn+"/IotHubQuotaMetricInfoListResultIterator.NextWithContext")
969 defer func() {
970 sc := -1
971 if iter.Response().Response.Response != nil {
972 sc = iter.Response().Response.Response.StatusCode
973 }
974 tracing.EndSpan(ctx, sc, err)
975 }()
976 }
977 iter.i++
978 if iter.i < len(iter.page.Values()) {
979 return nil
980 }
981 err = iter.page.NextWithContext(ctx)
982 if err != nil {
983 iter.i--
984 return err
985 }
986 iter.i = 0
987 return nil
988 }
989
990
991
992
993 func (iter *IotHubQuotaMetricInfoListResultIterator) Next() error {
994 return iter.NextWithContext(context.Background())
995 }
996
997
998 func (iter IotHubQuotaMetricInfoListResultIterator) NotDone() bool {
999 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1000 }
1001
1002
1003 func (iter IotHubQuotaMetricInfoListResultIterator) Response() IotHubQuotaMetricInfoListResult {
1004 return iter.page.Response()
1005 }
1006
1007
1008
1009 func (iter IotHubQuotaMetricInfoListResultIterator) Value() IotHubQuotaMetricInfo {
1010 if !iter.page.NotDone() {
1011 return IotHubQuotaMetricInfo{}
1012 }
1013 return iter.page.Values()[iter.i]
1014 }
1015
1016
1017 func NewIotHubQuotaMetricInfoListResultIterator(page IotHubQuotaMetricInfoListResultPage) IotHubQuotaMetricInfoListResultIterator {
1018 return IotHubQuotaMetricInfoListResultIterator{page: page}
1019 }
1020
1021
1022 func (ihqmilr IotHubQuotaMetricInfoListResult) IsEmpty() bool {
1023 return ihqmilr.Value == nil || len(*ihqmilr.Value) == 0
1024 }
1025
1026
1027 func (ihqmilr IotHubQuotaMetricInfoListResult) hasNextLink() bool {
1028 return ihqmilr.NextLink != nil && len(*ihqmilr.NextLink) != 0
1029 }
1030
1031
1032
1033 func (ihqmilr IotHubQuotaMetricInfoListResult) iotHubQuotaMetricInfoListResultPreparer(ctx context.Context) (*http.Request, error) {
1034 if !ihqmilr.hasNextLink() {
1035 return nil, nil
1036 }
1037 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1038 autorest.AsJSON(),
1039 autorest.AsGet(),
1040 autorest.WithBaseURL(to.String(ihqmilr.NextLink)))
1041 }
1042
1043
1044 type IotHubQuotaMetricInfoListResultPage struct {
1045 fn func(context.Context, IotHubQuotaMetricInfoListResult) (IotHubQuotaMetricInfoListResult, error)
1046 ihqmilr IotHubQuotaMetricInfoListResult
1047 }
1048
1049
1050
1051 func (page *IotHubQuotaMetricInfoListResultPage) NextWithContext(ctx context.Context) (err error) {
1052 if tracing.IsEnabled() {
1053 ctx = tracing.StartSpan(ctx, fqdn+"/IotHubQuotaMetricInfoListResultPage.NextWithContext")
1054 defer func() {
1055 sc := -1
1056 if page.Response().Response.Response != nil {
1057 sc = page.Response().Response.Response.StatusCode
1058 }
1059 tracing.EndSpan(ctx, sc, err)
1060 }()
1061 }
1062 for {
1063 next, err := page.fn(ctx, page.ihqmilr)
1064 if err != nil {
1065 return err
1066 }
1067 page.ihqmilr = next
1068 if !next.hasNextLink() || !next.IsEmpty() {
1069 break
1070 }
1071 }
1072 return nil
1073 }
1074
1075
1076
1077
1078 func (page *IotHubQuotaMetricInfoListResultPage) Next() error {
1079 return page.NextWithContext(context.Background())
1080 }
1081
1082
1083 func (page IotHubQuotaMetricInfoListResultPage) NotDone() bool {
1084 return !page.ihqmilr.IsEmpty()
1085 }
1086
1087
1088 func (page IotHubQuotaMetricInfoListResultPage) Response() IotHubQuotaMetricInfoListResult {
1089 return page.ihqmilr
1090 }
1091
1092
1093 func (page IotHubQuotaMetricInfoListResultPage) Values() []IotHubQuotaMetricInfo {
1094 if page.ihqmilr.IsEmpty() {
1095 return nil
1096 }
1097 return *page.ihqmilr.Value
1098 }
1099
1100
1101 func NewIotHubQuotaMetricInfoListResultPage(cur IotHubQuotaMetricInfoListResult, getNextPage func(context.Context, IotHubQuotaMetricInfoListResult) (IotHubQuotaMetricInfoListResult, error)) IotHubQuotaMetricInfoListResultPage {
1102 return IotHubQuotaMetricInfoListResultPage{
1103 fn: getNextPage,
1104 ihqmilr: cur,
1105 }
1106 }
1107
1108
1109
1110 type IotHubResourceCreateOrUpdateFuture struct {
1111 azure.FutureAPI
1112
1113
1114 Result func(IotHubResourceClient) (IotHubDescription, error)
1115 }
1116
1117
1118 func (future *IotHubResourceCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1119 var azFuture azure.Future
1120 if err := json.Unmarshal(body, &azFuture); err != nil {
1121 return err
1122 }
1123 future.FutureAPI = &azFuture
1124 future.Result = future.result
1125 return nil
1126 }
1127
1128
1129 func (future *IotHubResourceCreateOrUpdateFuture) result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
1130 var done bool
1131 done, err = future.DoneWithContext(context.Background(), client)
1132 if err != nil {
1133 err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1134 return
1135 }
1136 if !done {
1137 ihd.Response.Response = future.Response()
1138 err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceCreateOrUpdateFuture")
1139 return
1140 }
1141 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1142 if ihd.Response.Response, err = future.GetResult(sender); err == nil && ihd.Response.Response.StatusCode != http.StatusNoContent {
1143 ihd, err = client.CreateOrUpdateResponder(ihd.Response.Response)
1144 if err != nil {
1145 err = autorest.NewErrorWithError(err, "devices.IotHubResourceCreateOrUpdateFuture", "Result", ihd.Response.Response, "Failure responding to request")
1146 }
1147 }
1148 return
1149 }
1150
1151
1152
1153 type IotHubResourceDeleteFuture struct {
1154 azure.FutureAPI
1155
1156
1157 Result func(IotHubResourceClient) (SetObject, error)
1158 }
1159
1160
1161 func (future *IotHubResourceDeleteFuture) UnmarshalJSON(body []byte) error {
1162 var azFuture azure.Future
1163 if err := json.Unmarshal(body, &azFuture); err != nil {
1164 return err
1165 }
1166 future.FutureAPI = &azFuture
1167 future.Result = future.result
1168 return nil
1169 }
1170
1171
1172 func (future *IotHubResourceDeleteFuture) result(client IotHubResourceClient) (so SetObject, err error) {
1173 var done bool
1174 done, err = future.DoneWithContext(context.Background(), client)
1175 if err != nil {
1176 err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", future.Response(), "Polling failure")
1177 return
1178 }
1179 if !done {
1180 so.Response.Response = future.Response()
1181 err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceDeleteFuture")
1182 return
1183 }
1184 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1185 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
1186 so, err = client.DeleteResponder(so.Response.Response)
1187 if err != nil {
1188 err = autorest.NewErrorWithError(err, "devices.IotHubResourceDeleteFuture", "Result", so.Response.Response, "Failure responding to request")
1189 }
1190 }
1191 return
1192 }
1193
1194
1195
1196 type IotHubResourceUpdateFuture struct {
1197 azure.FutureAPI
1198
1199
1200 Result func(IotHubResourceClient) (IotHubDescription, error)
1201 }
1202
1203
1204 func (future *IotHubResourceUpdateFuture) UnmarshalJSON(body []byte) error {
1205 var azFuture azure.Future
1206 if err := json.Unmarshal(body, &azFuture); err != nil {
1207 return err
1208 }
1209 future.FutureAPI = &azFuture
1210 future.Result = future.result
1211 return nil
1212 }
1213
1214
1215 func (future *IotHubResourceUpdateFuture) result(client IotHubResourceClient) (ihd IotHubDescription, err error) {
1216 var done bool
1217 done, err = future.DoneWithContext(context.Background(), client)
1218 if err != nil {
1219 err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", future.Response(), "Polling failure")
1220 return
1221 }
1222 if !done {
1223 ihd.Response.Response = future.Response()
1224 err = azure.NewAsyncOpIncompleteError("devices.IotHubResourceUpdateFuture")
1225 return
1226 }
1227 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1228 if ihd.Response.Response, err = future.GetResult(sender); err == nil && ihd.Response.Response.StatusCode != http.StatusNoContent {
1229 ihd, err = client.UpdateResponder(ihd.Response.Response)
1230 if err != nil {
1231 err = autorest.NewErrorWithError(err, "devices.IotHubResourceUpdateFuture", "Result", ihd.Response.Response, "Failure responding to request")
1232 }
1233 }
1234 return
1235 }
1236
1237
1238 type IotHubSkuDescription struct {
1239
1240 ResourceType *string `json:"resourceType,omitempty"`
1241
1242 Sku *IotHubSkuInfo `json:"sku,omitempty"`
1243
1244 Capacity *IotHubCapacity `json:"capacity,omitempty"`
1245 }
1246
1247
1248 func (ihsd IotHubSkuDescription) MarshalJSON() ([]byte, error) {
1249 objectMap := make(map[string]interface{})
1250 if ihsd.Sku != nil {
1251 objectMap["sku"] = ihsd.Sku
1252 }
1253 if ihsd.Capacity != nil {
1254 objectMap["capacity"] = ihsd.Capacity
1255 }
1256 return json.Marshal(objectMap)
1257 }
1258
1259
1260
1261 type IotHubSkuDescriptionListResult struct {
1262 autorest.Response `json:"-"`
1263
1264 Value *[]IotHubSkuDescription `json:"value,omitempty"`
1265
1266 NextLink *string `json:"nextLink,omitempty"`
1267 }
1268
1269
1270 func (ihsdlr IotHubSkuDescriptionListResult) MarshalJSON() ([]byte, error) {
1271 objectMap := make(map[string]interface{})
1272 if ihsdlr.Value != nil {
1273 objectMap["value"] = ihsdlr.Value
1274 }
1275 return json.Marshal(objectMap)
1276 }
1277
1278
1279
1280 type IotHubSkuDescriptionListResultIterator struct {
1281 i int
1282 page IotHubSkuDescriptionListResultPage
1283 }
1284
1285
1286
1287 func (iter *IotHubSkuDescriptionListResultIterator) NextWithContext(ctx context.Context) (err error) {
1288 if tracing.IsEnabled() {
1289 ctx = tracing.StartSpan(ctx, fqdn+"/IotHubSkuDescriptionListResultIterator.NextWithContext")
1290 defer func() {
1291 sc := -1
1292 if iter.Response().Response.Response != nil {
1293 sc = iter.Response().Response.Response.StatusCode
1294 }
1295 tracing.EndSpan(ctx, sc, err)
1296 }()
1297 }
1298 iter.i++
1299 if iter.i < len(iter.page.Values()) {
1300 return nil
1301 }
1302 err = iter.page.NextWithContext(ctx)
1303 if err != nil {
1304 iter.i--
1305 return err
1306 }
1307 iter.i = 0
1308 return nil
1309 }
1310
1311
1312
1313
1314 func (iter *IotHubSkuDescriptionListResultIterator) Next() error {
1315 return iter.NextWithContext(context.Background())
1316 }
1317
1318
1319 func (iter IotHubSkuDescriptionListResultIterator) NotDone() bool {
1320 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1321 }
1322
1323
1324 func (iter IotHubSkuDescriptionListResultIterator) Response() IotHubSkuDescriptionListResult {
1325 return iter.page.Response()
1326 }
1327
1328
1329
1330 func (iter IotHubSkuDescriptionListResultIterator) Value() IotHubSkuDescription {
1331 if !iter.page.NotDone() {
1332 return IotHubSkuDescription{}
1333 }
1334 return iter.page.Values()[iter.i]
1335 }
1336
1337
1338 func NewIotHubSkuDescriptionListResultIterator(page IotHubSkuDescriptionListResultPage) IotHubSkuDescriptionListResultIterator {
1339 return IotHubSkuDescriptionListResultIterator{page: page}
1340 }
1341
1342
1343 func (ihsdlr IotHubSkuDescriptionListResult) IsEmpty() bool {
1344 return ihsdlr.Value == nil || len(*ihsdlr.Value) == 0
1345 }
1346
1347
1348 func (ihsdlr IotHubSkuDescriptionListResult) hasNextLink() bool {
1349 return ihsdlr.NextLink != nil && len(*ihsdlr.NextLink) != 0
1350 }
1351
1352
1353
1354 func (ihsdlr IotHubSkuDescriptionListResult) iotHubSkuDescriptionListResultPreparer(ctx context.Context) (*http.Request, error) {
1355 if !ihsdlr.hasNextLink() {
1356 return nil, nil
1357 }
1358 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1359 autorest.AsJSON(),
1360 autorest.AsGet(),
1361 autorest.WithBaseURL(to.String(ihsdlr.NextLink)))
1362 }
1363
1364
1365 type IotHubSkuDescriptionListResultPage struct {
1366 fn func(context.Context, IotHubSkuDescriptionListResult) (IotHubSkuDescriptionListResult, error)
1367 ihsdlr IotHubSkuDescriptionListResult
1368 }
1369
1370
1371
1372 func (page *IotHubSkuDescriptionListResultPage) NextWithContext(ctx context.Context) (err error) {
1373 if tracing.IsEnabled() {
1374 ctx = tracing.StartSpan(ctx, fqdn+"/IotHubSkuDescriptionListResultPage.NextWithContext")
1375 defer func() {
1376 sc := -1
1377 if page.Response().Response.Response != nil {
1378 sc = page.Response().Response.Response.StatusCode
1379 }
1380 tracing.EndSpan(ctx, sc, err)
1381 }()
1382 }
1383 for {
1384 next, err := page.fn(ctx, page.ihsdlr)
1385 if err != nil {
1386 return err
1387 }
1388 page.ihsdlr = next
1389 if !next.hasNextLink() || !next.IsEmpty() {
1390 break
1391 }
1392 }
1393 return nil
1394 }
1395
1396
1397
1398
1399 func (page *IotHubSkuDescriptionListResultPage) Next() error {
1400 return page.NextWithContext(context.Background())
1401 }
1402
1403
1404 func (page IotHubSkuDescriptionListResultPage) NotDone() bool {
1405 return !page.ihsdlr.IsEmpty()
1406 }
1407
1408
1409 func (page IotHubSkuDescriptionListResultPage) Response() IotHubSkuDescriptionListResult {
1410 return page.ihsdlr
1411 }
1412
1413
1414 func (page IotHubSkuDescriptionListResultPage) Values() []IotHubSkuDescription {
1415 if page.ihsdlr.IsEmpty() {
1416 return nil
1417 }
1418 return *page.ihsdlr.Value
1419 }
1420
1421
1422 func NewIotHubSkuDescriptionListResultPage(cur IotHubSkuDescriptionListResult, getNextPage func(context.Context, IotHubSkuDescriptionListResult) (IotHubSkuDescriptionListResult, error)) IotHubSkuDescriptionListResultPage {
1423 return IotHubSkuDescriptionListResultPage{
1424 fn: getNextPage,
1425 ihsdlr: cur,
1426 }
1427 }
1428
1429
1430 type IotHubSkuInfo struct {
1431
1432 Name IotHubSku `json:"name,omitempty"`
1433
1434 Tier IotHubSkuTier `json:"tier,omitempty"`
1435
1436 Capacity *int64 `json:"capacity,omitempty"`
1437 }
1438
1439
1440 func (ihsi IotHubSkuInfo) MarshalJSON() ([]byte, error) {
1441 objectMap := make(map[string]interface{})
1442 if ihsi.Name != "" {
1443 objectMap["name"] = ihsi.Name
1444 }
1445 if ihsi.Capacity != nil {
1446 objectMap["capacity"] = ihsi.Capacity
1447 }
1448 return json.Marshal(objectMap)
1449 }
1450
1451
1452 type IPFilterRule struct {
1453
1454 FilterName *string `json:"filterName,omitempty"`
1455
1456 Action IPFilterActionType `json:"action,omitempty"`
1457
1458 IPMask *string `json:"ipMask,omitempty"`
1459 }
1460
1461
1462 type JobResponse struct {
1463 autorest.Response `json:"-"`
1464
1465 JobID *string `json:"jobId,omitempty"`
1466
1467 StartTimeUtc *date.TimeRFC1123 `json:"startTimeUtc,omitempty"`
1468
1469 EndTimeUtc *date.TimeRFC1123 `json:"endTimeUtc,omitempty"`
1470
1471 Type JobType `json:"type,omitempty"`
1472
1473 Status JobStatus `json:"status,omitempty"`
1474
1475 FailureReason *string `json:"failureReason,omitempty"`
1476
1477 StatusMessage *string `json:"statusMessage,omitempty"`
1478
1479 ParentJobID *string `json:"parentJobId,omitempty"`
1480 }
1481
1482
1483 func (jr JobResponse) MarshalJSON() ([]byte, error) {
1484 objectMap := make(map[string]interface{})
1485 return json.Marshal(objectMap)
1486 }
1487
1488
1489 type JobResponseListResult struct {
1490 autorest.Response `json:"-"`
1491
1492 Value *[]JobResponse `json:"value,omitempty"`
1493
1494 NextLink *string `json:"nextLink,omitempty"`
1495 }
1496
1497
1498 func (jrlr JobResponseListResult) MarshalJSON() ([]byte, error) {
1499 objectMap := make(map[string]interface{})
1500 if jrlr.Value != nil {
1501 objectMap["value"] = jrlr.Value
1502 }
1503 return json.Marshal(objectMap)
1504 }
1505
1506
1507 type JobResponseListResultIterator struct {
1508 i int
1509 page JobResponseListResultPage
1510 }
1511
1512
1513
1514 func (iter *JobResponseListResultIterator) NextWithContext(ctx context.Context) (err error) {
1515 if tracing.IsEnabled() {
1516 ctx = tracing.StartSpan(ctx, fqdn+"/JobResponseListResultIterator.NextWithContext")
1517 defer func() {
1518 sc := -1
1519 if iter.Response().Response.Response != nil {
1520 sc = iter.Response().Response.Response.StatusCode
1521 }
1522 tracing.EndSpan(ctx, sc, err)
1523 }()
1524 }
1525 iter.i++
1526 if iter.i < len(iter.page.Values()) {
1527 return nil
1528 }
1529 err = iter.page.NextWithContext(ctx)
1530 if err != nil {
1531 iter.i--
1532 return err
1533 }
1534 iter.i = 0
1535 return nil
1536 }
1537
1538
1539
1540
1541 func (iter *JobResponseListResultIterator) Next() error {
1542 return iter.NextWithContext(context.Background())
1543 }
1544
1545
1546 func (iter JobResponseListResultIterator) NotDone() bool {
1547 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1548 }
1549
1550
1551 func (iter JobResponseListResultIterator) Response() JobResponseListResult {
1552 return iter.page.Response()
1553 }
1554
1555
1556
1557 func (iter JobResponseListResultIterator) Value() JobResponse {
1558 if !iter.page.NotDone() {
1559 return JobResponse{}
1560 }
1561 return iter.page.Values()[iter.i]
1562 }
1563
1564
1565 func NewJobResponseListResultIterator(page JobResponseListResultPage) JobResponseListResultIterator {
1566 return JobResponseListResultIterator{page: page}
1567 }
1568
1569
1570 func (jrlr JobResponseListResult) IsEmpty() bool {
1571 return jrlr.Value == nil || len(*jrlr.Value) == 0
1572 }
1573
1574
1575 func (jrlr JobResponseListResult) hasNextLink() bool {
1576 return jrlr.NextLink != nil && len(*jrlr.NextLink) != 0
1577 }
1578
1579
1580
1581 func (jrlr JobResponseListResult) jobResponseListResultPreparer(ctx context.Context) (*http.Request, error) {
1582 if !jrlr.hasNextLink() {
1583 return nil, nil
1584 }
1585 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1586 autorest.AsJSON(),
1587 autorest.AsGet(),
1588 autorest.WithBaseURL(to.String(jrlr.NextLink)))
1589 }
1590
1591
1592 type JobResponseListResultPage struct {
1593 fn func(context.Context, JobResponseListResult) (JobResponseListResult, error)
1594 jrlr JobResponseListResult
1595 }
1596
1597
1598
1599 func (page *JobResponseListResultPage) NextWithContext(ctx context.Context) (err error) {
1600 if tracing.IsEnabled() {
1601 ctx = tracing.StartSpan(ctx, fqdn+"/JobResponseListResultPage.NextWithContext")
1602 defer func() {
1603 sc := -1
1604 if page.Response().Response.Response != nil {
1605 sc = page.Response().Response.Response.StatusCode
1606 }
1607 tracing.EndSpan(ctx, sc, err)
1608 }()
1609 }
1610 for {
1611 next, err := page.fn(ctx, page.jrlr)
1612 if err != nil {
1613 return err
1614 }
1615 page.jrlr = next
1616 if !next.hasNextLink() || !next.IsEmpty() {
1617 break
1618 }
1619 }
1620 return nil
1621 }
1622
1623
1624
1625
1626 func (page *JobResponseListResultPage) Next() error {
1627 return page.NextWithContext(context.Background())
1628 }
1629
1630
1631 func (page JobResponseListResultPage) NotDone() bool {
1632 return !page.jrlr.IsEmpty()
1633 }
1634
1635
1636 func (page JobResponseListResultPage) Response() JobResponseListResult {
1637 return page.jrlr
1638 }
1639
1640
1641 func (page JobResponseListResultPage) Values() []JobResponse {
1642 if page.jrlr.IsEmpty() {
1643 return nil
1644 }
1645 return *page.jrlr.Value
1646 }
1647
1648
1649 func NewJobResponseListResultPage(cur JobResponseListResult, getNextPage func(context.Context, JobResponseListResult) (JobResponseListResult, error)) JobResponseListResultPage {
1650 return JobResponseListResultPage{
1651 fn: getNextPage,
1652 jrlr: cur,
1653 }
1654 }
1655
1656
1657 type MatchedRoute struct {
1658
1659 Properties *RouteProperties `json:"properties,omitempty"`
1660 }
1661
1662
1663 type MessagingEndpointProperties struct {
1664
1665 LockDurationAsIso8601 *string `json:"lockDurationAsIso8601,omitempty"`
1666
1667 TTLAsIso8601 *string `json:"ttlAsIso8601,omitempty"`
1668
1669 MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"`
1670 }
1671
1672
1673 type Name struct {
1674
1675 Value *string `json:"value,omitempty"`
1676
1677 LocalizedValue *string `json:"localizedValue,omitempty"`
1678 }
1679
1680
1681 type Operation struct {
1682
1683 Name *string `json:"name,omitempty"`
1684
1685 Display *OperationDisplay `json:"display,omitempty"`
1686 }
1687
1688
1689 func (o Operation) MarshalJSON() ([]byte, error) {
1690 objectMap := make(map[string]interface{})
1691 if o.Display != nil {
1692 objectMap["display"] = o.Display
1693 }
1694 return json.Marshal(objectMap)
1695 }
1696
1697
1698 type OperationDisplay struct {
1699
1700 Provider *string `json:"provider,omitempty"`
1701
1702 Resource *string `json:"resource,omitempty"`
1703
1704 Operation *string `json:"operation,omitempty"`
1705 }
1706
1707
1708 func (o OperationDisplay) MarshalJSON() ([]byte, error) {
1709 objectMap := make(map[string]interface{})
1710 return json.Marshal(objectMap)
1711 }
1712
1713
1714 type OperationInputs struct {
1715
1716 Name *string `json:"name,omitempty"`
1717 }
1718
1719
1720
1721 type OperationListResult struct {
1722 autorest.Response `json:"-"`
1723
1724 Value *[]Operation `json:"value,omitempty"`
1725
1726 NextLink *string `json:"nextLink,omitempty"`
1727 }
1728
1729
1730 func (olr OperationListResult) MarshalJSON() ([]byte, error) {
1731 objectMap := make(map[string]interface{})
1732 return json.Marshal(objectMap)
1733 }
1734
1735
1736 type OperationListResultIterator struct {
1737 i int
1738 page OperationListResultPage
1739 }
1740
1741
1742
1743 func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
1744 if tracing.IsEnabled() {
1745 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
1746 defer func() {
1747 sc := -1
1748 if iter.Response().Response.Response != nil {
1749 sc = iter.Response().Response.Response.StatusCode
1750 }
1751 tracing.EndSpan(ctx, sc, err)
1752 }()
1753 }
1754 iter.i++
1755 if iter.i < len(iter.page.Values()) {
1756 return nil
1757 }
1758 err = iter.page.NextWithContext(ctx)
1759 if err != nil {
1760 iter.i--
1761 return err
1762 }
1763 iter.i = 0
1764 return nil
1765 }
1766
1767
1768
1769
1770 func (iter *OperationListResultIterator) Next() error {
1771 return iter.NextWithContext(context.Background())
1772 }
1773
1774
1775 func (iter OperationListResultIterator) NotDone() bool {
1776 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1777 }
1778
1779
1780 func (iter OperationListResultIterator) Response() OperationListResult {
1781 return iter.page.Response()
1782 }
1783
1784
1785
1786 func (iter OperationListResultIterator) Value() Operation {
1787 if !iter.page.NotDone() {
1788 return Operation{}
1789 }
1790 return iter.page.Values()[iter.i]
1791 }
1792
1793
1794 func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
1795 return OperationListResultIterator{page: page}
1796 }
1797
1798
1799 func (olr OperationListResult) IsEmpty() bool {
1800 return olr.Value == nil || len(*olr.Value) == 0
1801 }
1802
1803
1804 func (olr OperationListResult) hasNextLink() bool {
1805 return olr.NextLink != nil && len(*olr.NextLink) != 0
1806 }
1807
1808
1809
1810 func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
1811 if !olr.hasNextLink() {
1812 return nil, nil
1813 }
1814 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1815 autorest.AsJSON(),
1816 autorest.AsGet(),
1817 autorest.WithBaseURL(to.String(olr.NextLink)))
1818 }
1819
1820
1821 type OperationListResultPage struct {
1822 fn func(context.Context, OperationListResult) (OperationListResult, error)
1823 olr OperationListResult
1824 }
1825
1826
1827
1828 func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
1829 if tracing.IsEnabled() {
1830 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
1831 defer func() {
1832 sc := -1
1833 if page.Response().Response.Response != nil {
1834 sc = page.Response().Response.Response.StatusCode
1835 }
1836 tracing.EndSpan(ctx, sc, err)
1837 }()
1838 }
1839 for {
1840 next, err := page.fn(ctx, page.olr)
1841 if err != nil {
1842 return err
1843 }
1844 page.olr = next
1845 if !next.hasNextLink() || !next.IsEmpty() {
1846 break
1847 }
1848 }
1849 return nil
1850 }
1851
1852
1853
1854
1855 func (page *OperationListResultPage) Next() error {
1856 return page.NextWithContext(context.Background())
1857 }
1858
1859
1860 func (page OperationListResultPage) NotDone() bool {
1861 return !page.olr.IsEmpty()
1862 }
1863
1864
1865 func (page OperationListResultPage) Response() OperationListResult {
1866 return page.olr
1867 }
1868
1869
1870 func (page OperationListResultPage) Values() []Operation {
1871 if page.olr.IsEmpty() {
1872 return nil
1873 }
1874 return *page.olr.Value
1875 }
1876
1877
1878 func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
1879 return OperationListResultPage{
1880 fn: getNextPage,
1881 olr: cur,
1882 }
1883 }
1884
1885
1886
1887
1888
1889 type OperationsMonitoringProperties struct {
1890 Events map[string]*OperationMonitoringLevel `json:"events"`
1891 }
1892
1893
1894 func (omp OperationsMonitoringProperties) MarshalJSON() ([]byte, error) {
1895 objectMap := make(map[string]interface{})
1896 if omp.Events != nil {
1897 objectMap["events"] = omp.Events
1898 }
1899 return json.Marshal(objectMap)
1900 }
1901
1902
1903 type RegistryStatistics struct {
1904 autorest.Response `json:"-"`
1905
1906 TotalDeviceCount *int64 `json:"totalDeviceCount,omitempty"`
1907
1908 EnabledDeviceCount *int64 `json:"enabledDeviceCount,omitempty"`
1909
1910 DisabledDeviceCount *int64 `json:"disabledDeviceCount,omitempty"`
1911 }
1912
1913
1914 func (rs RegistryStatistics) MarshalJSON() ([]byte, error) {
1915 objectMap := make(map[string]interface{})
1916 return json.Marshal(objectMap)
1917 }
1918
1919
1920 type Resource struct {
1921
1922 ID *string `json:"id,omitempty"`
1923
1924 Name *string `json:"name,omitempty"`
1925
1926 Type *string `json:"type,omitempty"`
1927
1928 Location *string `json:"location,omitempty"`
1929
1930 Tags map[string]*string `json:"tags"`
1931 }
1932
1933
1934 func (r Resource) MarshalJSON() ([]byte, error) {
1935 objectMap := make(map[string]interface{})
1936 if r.Location != nil {
1937 objectMap["location"] = r.Location
1938 }
1939 if r.Tags != nil {
1940 objectMap["tags"] = r.Tags
1941 }
1942 return json.Marshal(objectMap)
1943 }
1944
1945
1946 type RouteCompilationError struct {
1947
1948 Message *string `json:"message,omitempty"`
1949
1950 Severity RouteErrorSeverity `json:"severity,omitempty"`
1951
1952 Location *RouteErrorRange `json:"location,omitempty"`
1953 }
1954
1955
1956 type RouteErrorPosition struct {
1957
1958 Line *int32 `json:"line,omitempty"`
1959
1960 Column *int32 `json:"column,omitempty"`
1961 }
1962
1963
1964 type RouteErrorRange struct {
1965
1966 Start *RouteErrorPosition `json:"start,omitempty"`
1967
1968 End *RouteErrorPosition `json:"end,omitempty"`
1969 }
1970
1971
1972 type RouteProperties struct {
1973
1974 Name *string `json:"name,omitempty"`
1975
1976 Source RoutingSource `json:"source,omitempty"`
1977
1978 Condition *string `json:"condition,omitempty"`
1979
1980 EndpointNames *[]string `json:"endpointNames,omitempty"`
1981
1982 IsEnabled *bool `json:"isEnabled,omitempty"`
1983 }
1984
1985
1986
1987
1988 type RoutingEndpoints struct {
1989
1990 ServiceBusQueues *[]RoutingServiceBusQueueEndpointProperties `json:"serviceBusQueues,omitempty"`
1991
1992 ServiceBusTopics *[]RoutingServiceBusTopicEndpointProperties `json:"serviceBusTopics,omitempty"`
1993
1994 EventHubs *[]RoutingEventHubProperties `json:"eventHubs,omitempty"`
1995
1996 StorageContainers *[]RoutingStorageContainerProperties `json:"storageContainers,omitempty"`
1997 }
1998
1999
2000 type RoutingEventHubProperties struct {
2001
2002 ConnectionString *string `json:"connectionString,omitempty"`
2003
2004 Name *string `json:"name,omitempty"`
2005
2006 SubscriptionID *string `json:"subscriptionId,omitempty"`
2007
2008 ResourceGroup *string `json:"resourceGroup,omitempty"`
2009 }
2010
2011
2012 type RoutingMessage struct {
2013
2014 Body *string `json:"body,omitempty"`
2015
2016 AppProperties map[string]*string `json:"appProperties"`
2017
2018 SystemProperties map[string]*string `json:"systemProperties"`
2019 }
2020
2021
2022 func (rm RoutingMessage) MarshalJSON() ([]byte, error) {
2023 objectMap := make(map[string]interface{})
2024 if rm.Body != nil {
2025 objectMap["body"] = rm.Body
2026 }
2027 if rm.AppProperties != nil {
2028 objectMap["appProperties"] = rm.AppProperties
2029 }
2030 if rm.SystemProperties != nil {
2031 objectMap["systemProperties"] = rm.SystemProperties
2032 }
2033 return json.Marshal(objectMap)
2034 }
2035
2036
2037
2038 type RoutingProperties struct {
2039 Endpoints *RoutingEndpoints `json:"endpoints,omitempty"`
2040
2041 Routes *[]RouteProperties `json:"routes,omitempty"`
2042
2043 FallbackRoute *FallbackRouteProperties `json:"fallbackRoute,omitempty"`
2044 }
2045
2046
2047 type RoutingServiceBusQueueEndpointProperties struct {
2048
2049 ConnectionString *string `json:"connectionString,omitempty"`
2050
2051 Name *string `json:"name,omitempty"`
2052
2053 SubscriptionID *string `json:"subscriptionId,omitempty"`
2054
2055 ResourceGroup *string `json:"resourceGroup,omitempty"`
2056 }
2057
2058
2059 type RoutingServiceBusTopicEndpointProperties struct {
2060
2061 ConnectionString *string `json:"connectionString,omitempty"`
2062
2063 Name *string `json:"name,omitempty"`
2064
2065 SubscriptionID *string `json:"subscriptionId,omitempty"`
2066
2067 ResourceGroup *string `json:"resourceGroup,omitempty"`
2068 }
2069
2070
2071 type RoutingStorageContainerProperties struct {
2072
2073 ConnectionString *string `json:"connectionString,omitempty"`
2074
2075 Name *string `json:"name,omitempty"`
2076
2077 SubscriptionID *string `json:"subscriptionId,omitempty"`
2078
2079 ResourceGroup *string `json:"resourceGroup,omitempty"`
2080
2081 ContainerName *string `json:"containerName,omitempty"`
2082
2083 FileNameFormat *string `json:"fileNameFormat,omitempty"`
2084
2085 BatchFrequencyInSeconds *int32 `json:"batchFrequencyInSeconds,omitempty"`
2086
2087 MaxChunkSizeInBytes *int32 `json:"maxChunkSizeInBytes,omitempty"`
2088
2089 Encoding *string `json:"encoding,omitempty"`
2090 }
2091
2092
2093 type RoutingTwin struct {
2094
2095 Tags interface{} `json:"tags,omitempty"`
2096 Properties *RoutingTwinProperties `json:"properties,omitempty"`
2097 }
2098
2099
2100 type RoutingTwinProperties struct {
2101
2102 DesiredProperties interface{} `json:"desiredProperties,omitempty"`
2103
2104 ReportedProperties interface{} `json:"reportedProperties,omitempty"`
2105 }
2106
2107
2108 type SetObject struct {
2109 autorest.Response `json:"-"`
2110 Value interface{} `json:"value,omitempty"`
2111 }
2112
2113
2114 type SharedAccessSignatureAuthorizationRule struct {
2115 autorest.Response `json:"-"`
2116
2117 KeyName *string `json:"keyName,omitempty"`
2118
2119 PrimaryKey *string `json:"primaryKey,omitempty"`
2120
2121 SecondaryKey *string `json:"secondaryKey,omitempty"`
2122
2123 Rights AccessRights `json:"rights,omitempty"`
2124 }
2125
2126
2127 type SharedAccessSignatureAuthorizationRuleListResult struct {
2128 autorest.Response `json:"-"`
2129
2130 Value *[]SharedAccessSignatureAuthorizationRule `json:"value,omitempty"`
2131
2132 NextLink *string `json:"nextLink,omitempty"`
2133 }
2134
2135
2136 func (sasarlr SharedAccessSignatureAuthorizationRuleListResult) MarshalJSON() ([]byte, error) {
2137 objectMap := make(map[string]interface{})
2138 if sasarlr.Value != nil {
2139 objectMap["value"] = sasarlr.Value
2140 }
2141 return json.Marshal(objectMap)
2142 }
2143
2144
2145
2146 type SharedAccessSignatureAuthorizationRuleListResultIterator struct {
2147 i int
2148 page SharedAccessSignatureAuthorizationRuleListResultPage
2149 }
2150
2151
2152
2153 func (iter *SharedAccessSignatureAuthorizationRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
2154 if tracing.IsEnabled() {
2155 ctx = tracing.StartSpan(ctx, fqdn+"/SharedAccessSignatureAuthorizationRuleListResultIterator.NextWithContext")
2156 defer func() {
2157 sc := -1
2158 if iter.Response().Response.Response != nil {
2159 sc = iter.Response().Response.Response.StatusCode
2160 }
2161 tracing.EndSpan(ctx, sc, err)
2162 }()
2163 }
2164 iter.i++
2165 if iter.i < len(iter.page.Values()) {
2166 return nil
2167 }
2168 err = iter.page.NextWithContext(ctx)
2169 if err != nil {
2170 iter.i--
2171 return err
2172 }
2173 iter.i = 0
2174 return nil
2175 }
2176
2177
2178
2179
2180 func (iter *SharedAccessSignatureAuthorizationRuleListResultIterator) Next() error {
2181 return iter.NextWithContext(context.Background())
2182 }
2183
2184
2185 func (iter SharedAccessSignatureAuthorizationRuleListResultIterator) NotDone() bool {
2186 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2187 }
2188
2189
2190 func (iter SharedAccessSignatureAuthorizationRuleListResultIterator) Response() SharedAccessSignatureAuthorizationRuleListResult {
2191 return iter.page.Response()
2192 }
2193
2194
2195
2196 func (iter SharedAccessSignatureAuthorizationRuleListResultIterator) Value() SharedAccessSignatureAuthorizationRule {
2197 if !iter.page.NotDone() {
2198 return SharedAccessSignatureAuthorizationRule{}
2199 }
2200 return iter.page.Values()[iter.i]
2201 }
2202
2203
2204 func NewSharedAccessSignatureAuthorizationRuleListResultIterator(page SharedAccessSignatureAuthorizationRuleListResultPage) SharedAccessSignatureAuthorizationRuleListResultIterator {
2205 return SharedAccessSignatureAuthorizationRuleListResultIterator{page: page}
2206 }
2207
2208
2209 func (sasarlr SharedAccessSignatureAuthorizationRuleListResult) IsEmpty() bool {
2210 return sasarlr.Value == nil || len(*sasarlr.Value) == 0
2211 }
2212
2213
2214 func (sasarlr SharedAccessSignatureAuthorizationRuleListResult) hasNextLink() bool {
2215 return sasarlr.NextLink != nil && len(*sasarlr.NextLink) != 0
2216 }
2217
2218
2219
2220 func (sasarlr SharedAccessSignatureAuthorizationRuleListResult) sharedAccessSignatureAuthorizationRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
2221 if !sasarlr.hasNextLink() {
2222 return nil, nil
2223 }
2224 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2225 autorest.AsJSON(),
2226 autorest.AsGet(),
2227 autorest.WithBaseURL(to.String(sasarlr.NextLink)))
2228 }
2229
2230
2231
2232 type SharedAccessSignatureAuthorizationRuleListResultPage struct {
2233 fn func(context.Context, SharedAccessSignatureAuthorizationRuleListResult) (SharedAccessSignatureAuthorizationRuleListResult, error)
2234 sasarlr SharedAccessSignatureAuthorizationRuleListResult
2235 }
2236
2237
2238
2239 func (page *SharedAccessSignatureAuthorizationRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
2240 if tracing.IsEnabled() {
2241 ctx = tracing.StartSpan(ctx, fqdn+"/SharedAccessSignatureAuthorizationRuleListResultPage.NextWithContext")
2242 defer func() {
2243 sc := -1
2244 if page.Response().Response.Response != nil {
2245 sc = page.Response().Response.Response.StatusCode
2246 }
2247 tracing.EndSpan(ctx, sc, err)
2248 }()
2249 }
2250 for {
2251 next, err := page.fn(ctx, page.sasarlr)
2252 if err != nil {
2253 return err
2254 }
2255 page.sasarlr = next
2256 if !next.hasNextLink() || !next.IsEmpty() {
2257 break
2258 }
2259 }
2260 return nil
2261 }
2262
2263
2264
2265
2266 func (page *SharedAccessSignatureAuthorizationRuleListResultPage) Next() error {
2267 return page.NextWithContext(context.Background())
2268 }
2269
2270
2271 func (page SharedAccessSignatureAuthorizationRuleListResultPage) NotDone() bool {
2272 return !page.sasarlr.IsEmpty()
2273 }
2274
2275
2276 func (page SharedAccessSignatureAuthorizationRuleListResultPage) Response() SharedAccessSignatureAuthorizationRuleListResult {
2277 return page.sasarlr
2278 }
2279
2280
2281 func (page SharedAccessSignatureAuthorizationRuleListResultPage) Values() []SharedAccessSignatureAuthorizationRule {
2282 if page.sasarlr.IsEmpty() {
2283 return nil
2284 }
2285 return *page.sasarlr.Value
2286 }
2287
2288
2289 func NewSharedAccessSignatureAuthorizationRuleListResultPage(cur SharedAccessSignatureAuthorizationRuleListResult, getNextPage func(context.Context, SharedAccessSignatureAuthorizationRuleListResult) (SharedAccessSignatureAuthorizationRuleListResult, error)) SharedAccessSignatureAuthorizationRuleListResultPage {
2290 return SharedAccessSignatureAuthorizationRuleListResultPage{
2291 fn: getNextPage,
2292 sasarlr: cur,
2293 }
2294 }
2295
2296
2297 type StorageEndpointProperties struct {
2298
2299 SasTTLAsIso8601 *string `json:"sasTtlAsIso8601,omitempty"`
2300
2301 ConnectionString *string `json:"connectionString,omitempty"`
2302
2303 ContainerName *string `json:"containerName,omitempty"`
2304 }
2305
2306
2307
2308 type TagsResource struct {
2309
2310 Tags map[string]*string `json:"tags"`
2311 }
2312
2313
2314 func (tr TagsResource) MarshalJSON() ([]byte, error) {
2315 objectMap := make(map[string]interface{})
2316 if tr.Tags != nil {
2317 objectMap["tags"] = tr.Tags
2318 }
2319 return json.Marshal(objectMap)
2320 }
2321
2322
2323 type TestAllRoutesInput struct {
2324
2325 RoutingSource RoutingSource `json:"routingSource,omitempty"`
2326
2327 Message *RoutingMessage `json:"message,omitempty"`
2328
2329 Twin *RoutingTwin `json:"twin,omitempty"`
2330 }
2331
2332
2333 type TestAllRoutesResult struct {
2334 autorest.Response `json:"-"`
2335
2336 Routes *[]MatchedRoute `json:"routes,omitempty"`
2337 }
2338
2339
2340 type TestRouteInput struct {
2341
2342 Message *RoutingMessage `json:"message,omitempty"`
2343
2344 Route *RouteProperties `json:"route,omitempty"`
2345
2346 Twin *RoutingTwin `json:"twin,omitempty"`
2347 }
2348
2349
2350 type TestRouteResult struct {
2351 autorest.Response `json:"-"`
2352
2353 Result TestResultStatus `json:"result,omitempty"`
2354
2355 Details *TestRouteResultDetails `json:"details,omitempty"`
2356 }
2357
2358
2359 type TestRouteResultDetails struct {
2360
2361 CompilationErrors *[]RouteCompilationError `json:"compilationErrors,omitempty"`
2362 }
2363
2364
2365 type UserSubscriptionQuota struct {
2366
2367 ID *string `json:"id,omitempty"`
2368
2369 Type *string `json:"type,omitempty"`
2370
2371 Unit *string `json:"unit,omitempty"`
2372
2373 CurrentValue *int32 `json:"currentValue,omitempty"`
2374
2375 Limit *int32 `json:"limit,omitempty"`
2376
2377 Name *Name `json:"name,omitempty"`
2378 }
2379
2380
2381 type UserSubscriptionQuotaListResult struct {
2382 autorest.Response `json:"-"`
2383 Value *[]UserSubscriptionQuota `json:"value,omitempty"`
2384
2385 NextLink *string `json:"nextLink,omitempty"`
2386 }
2387
2388
2389 func (usqlr UserSubscriptionQuotaListResult) MarshalJSON() ([]byte, error) {
2390 objectMap := make(map[string]interface{})
2391 if usqlr.Value != nil {
2392 objectMap["value"] = usqlr.Value
2393 }
2394 return json.Marshal(objectMap)
2395 }
2396
View as plain text