forked from Azure/azure-sdk-for-go
/
models.go
5274 lines (4722 loc) · 212 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
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package streamanalytics
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics"
// AvroSerialization describes how data from an input is serialized or how data is serialized when written
// to an output in Avro format.
type AvroSerialization struct {
// Properties - The properties that are associated with the Avro serialization type. Required on PUT (CreateOrReplace) requests.
Properties interface{} `json:"properties,omitempty"`
// Type - Possible values include: 'TypeSerialization', 'TypeAvro', 'TypeJSON', 'TypeCsv'
Type Type `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AvroSerialization.
func (as AvroSerialization) MarshalJSON() ([]byte, error) {
as.Type = TypeAvro
objectMap := make(map[string]interface{})
if as.Properties != nil {
objectMap["properties"] = as.Properties
}
if as.Type != "" {
objectMap["type"] = as.Type
}
return json.Marshal(objectMap)
}
// AsAvroSerialization is the BasicSerialization implementation for AvroSerialization.
func (as AvroSerialization) AsAvroSerialization() (*AvroSerialization, bool) {
return &as, true
}
// AsJSONSerialization is the BasicSerialization implementation for AvroSerialization.
func (as AvroSerialization) AsJSONSerialization() (*JSONSerialization, bool) {
return nil, false
}
// AsCsvSerialization is the BasicSerialization implementation for AvroSerialization.
func (as AvroSerialization) AsCsvSerialization() (*CsvSerialization, bool) {
return nil, false
}
// AsSerialization is the BasicSerialization implementation for AvroSerialization.
func (as AvroSerialization) AsSerialization() (*Serialization, bool) {
return nil, false
}
// AsBasicSerialization is the BasicSerialization implementation for AvroSerialization.
func (as AvroSerialization) AsBasicSerialization() (BasicSerialization, bool) {
return &as, true
}
// AzureDataLakeStoreOutputDataSource describes an Azure Data Lake Store output data source.
type AzureDataLakeStoreOutputDataSource struct {
// AzureDataLakeStoreOutputDataSourceProperties - The properties that are associated with an Azure Data Lake Store output. Required on PUT (CreateOrReplace) requests.
*AzureDataLakeStoreOutputDataSourceProperties `json:"properties,omitempty"`
// Type - Possible values include: 'TypeOutputDataSource', 'TypeMicrosoftDataLakeAccounts', 'TypePowerBI', 'TypeMicrosoftServiceBusTopic', 'TypeMicrosoftServiceBusQueue', 'TypeMicrosoftStorageDocumentDB', 'TypeMicrosoftSQLServerDatabase', 'TypeMicrosoftServiceBusEventHub', 'TypeMicrosoftStorageTable', 'TypeMicrosoftStorageBlob'
Type TypeBasicOutputDataSource `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) MarshalJSON() ([]byte, error) {
adlsods.Type = TypeMicrosoftDataLakeAccounts
objectMap := make(map[string]interface{})
if adlsods.AzureDataLakeStoreOutputDataSourceProperties != nil {
objectMap["properties"] = adlsods.AzureDataLakeStoreOutputDataSourceProperties
}
if adlsods.Type != "" {
objectMap["type"] = adlsods.Type
}
return json.Marshal(objectMap)
}
// AsAzureDataLakeStoreOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) {
return &adlsods, true
}
// AsPowerBIOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) {
return nil, false
}
// AsServiceBusTopicOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) {
return nil, false
}
// AsServiceBusQueueOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) {
return nil, false
}
// AsDocumentDbOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) {
return nil, false
}
// AsAzureSQLDatabaseOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) {
return nil, false
}
// AsEventHubOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) {
return nil, false
}
// AsAzureTableOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) {
return nil, false
}
// AsBlobOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) {
return nil, false
}
// AsOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsOutputDataSource() (*OutputDataSource, bool) {
return nil, false
}
// AsBasicOutputDataSource is the BasicOutputDataSource implementation for AzureDataLakeStoreOutputDataSource.
func (adlsods AzureDataLakeStoreOutputDataSource) AsBasicOutputDataSource() (BasicOutputDataSource, bool) {
return &adlsods, true
}
// UnmarshalJSON is the custom unmarshaler for AzureDataLakeStoreOutputDataSource struct.
func (adlsods *AzureDataLakeStoreOutputDataSource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var azureDataLakeStoreOutputDataSourceProperties AzureDataLakeStoreOutputDataSourceProperties
err = json.Unmarshal(*v, &azureDataLakeStoreOutputDataSourceProperties)
if err != nil {
return err
}
adlsods.AzureDataLakeStoreOutputDataSourceProperties = &azureDataLakeStoreOutputDataSourceProperties
}
case "type":
if v != nil {
var typeVar TypeBasicOutputDataSource
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
adlsods.Type = typeVar
}
}
}
return nil
}
// AzureDataLakeStoreOutputDataSourceProperties the properties that are associated with an Azure Data Lake
// Store.
type AzureDataLakeStoreOutputDataSourceProperties struct {
// AccountName - The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests.
AccountName *string `json:"accountName,omitempty"`
// TenantID - The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests.
TenantID *string `json:"tenantId,omitempty"`
// FilePathPrefix - The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests.
FilePathPrefix *string `json:"filePathPrefix,omitempty"`
// DateFormat - The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead.
DateFormat *string `json:"dateFormat,omitempty"`
// TimeFormat - The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead.
TimeFormat *string `json:"timeFormat,omitempty"`
// RefreshToken - A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.
RefreshToken *string `json:"refreshToken,omitempty"`
// TokenUserPrincipalName - The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.
TokenUserPrincipalName *string `json:"tokenUserPrincipalName,omitempty"`
// TokenUserDisplayName - The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.
TokenUserDisplayName *string `json:"tokenUserDisplayName,omitempty"`
}
// AzureMachineLearningWebServiceFunctionBinding the binding to an Azure Machine Learning web service.
type AzureMachineLearningWebServiceFunctionBinding struct {
// AzureMachineLearningWebServiceFunctionBindingProperties - The binding properties associated with an Azure Machine learning web service.
*AzureMachineLearningWebServiceFunctionBindingProperties `json:"properties,omitempty"`
// Type - Possible values include: 'TypeFunctionBinding', 'TypeMicrosoftStreamAnalyticsJavascriptUdf', 'TypeMicrosoftMachineLearningWebService'
Type TypeBasicFunctionBinding `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureMachineLearningWebServiceFunctionBinding.
func (amlwsfb AzureMachineLearningWebServiceFunctionBinding) MarshalJSON() ([]byte, error) {
amlwsfb.Type = TypeMicrosoftMachineLearningWebService
objectMap := make(map[string]interface{})
if amlwsfb.AzureMachineLearningWebServiceFunctionBindingProperties != nil {
objectMap["properties"] = amlwsfb.AzureMachineLearningWebServiceFunctionBindingProperties
}
if amlwsfb.Type != "" {
objectMap["type"] = amlwsfb.Type
}
return json.Marshal(objectMap)
}
// AsJavaScriptFunctionBinding is the BasicFunctionBinding implementation for AzureMachineLearningWebServiceFunctionBinding.
func (amlwsfb AzureMachineLearningWebServiceFunctionBinding) AsJavaScriptFunctionBinding() (*JavaScriptFunctionBinding, bool) {
return nil, false
}
// AsAzureMachineLearningWebServiceFunctionBinding is the BasicFunctionBinding implementation for AzureMachineLearningWebServiceFunctionBinding.
func (amlwsfb AzureMachineLearningWebServiceFunctionBinding) AsAzureMachineLearningWebServiceFunctionBinding() (*AzureMachineLearningWebServiceFunctionBinding, bool) {
return &amlwsfb, true
}
// AsFunctionBinding is the BasicFunctionBinding implementation for AzureMachineLearningWebServiceFunctionBinding.
func (amlwsfb AzureMachineLearningWebServiceFunctionBinding) AsFunctionBinding() (*FunctionBinding, bool) {
return nil, false
}
// AsBasicFunctionBinding is the BasicFunctionBinding implementation for AzureMachineLearningWebServiceFunctionBinding.
func (amlwsfb AzureMachineLearningWebServiceFunctionBinding) AsBasicFunctionBinding() (BasicFunctionBinding, bool) {
return &amlwsfb, true
}
// UnmarshalJSON is the custom unmarshaler for AzureMachineLearningWebServiceFunctionBinding struct.
func (amlwsfb *AzureMachineLearningWebServiceFunctionBinding) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var azureMachineLearningWebServiceFunctionBindingProperties AzureMachineLearningWebServiceFunctionBindingProperties
err = json.Unmarshal(*v, &azureMachineLearningWebServiceFunctionBindingProperties)
if err != nil {
return err
}
amlwsfb.AzureMachineLearningWebServiceFunctionBindingProperties = &azureMachineLearningWebServiceFunctionBindingProperties
}
case "type":
if v != nil {
var typeVar TypeBasicFunctionBinding
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
amlwsfb.Type = typeVar
}
}
}
return nil
}
// AzureMachineLearningWebServiceFunctionBindingProperties the binding properties associated with an Azure
// Machine learning web service.
type AzureMachineLearningWebServiceFunctionBindingProperties struct {
// Endpoint - The Request-Response execute endpoint of the Azure Machine Learning web service. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs
Endpoint *string `json:"endpoint,omitempty"`
// APIKey - The API key used to authenticate with Request-Response endpoint.
APIKey *string `json:"apiKey,omitempty"`
// Inputs - The inputs for the Azure Machine Learning web service endpoint.
Inputs *AzureMachineLearningWebServiceInputs `json:"inputs,omitempty"`
// Outputs - A list of outputs from the Azure Machine Learning web service endpoint execution.
Outputs *[]AzureMachineLearningWebServiceOutputColumn `json:"outputs,omitempty"`
// BatchSize - Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.
BatchSize *int32 `json:"batchSize,omitempty"`
}
// AzureMachineLearningWebServiceFunctionBindingRetrievalProperties the binding retrieval properties
// associated with an Azure Machine learning web service.
type AzureMachineLearningWebServiceFunctionBindingRetrievalProperties struct {
// ExecuteEndpoint - The Request-Response execute endpoint of the Azure Machine Learning web service. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs
ExecuteEndpoint *string `json:"executeEndpoint,omitempty"`
// UdfType - The function type. Possible values include: 'Scalar'
UdfType UdfType `json:"udfType,omitempty"`
}
// AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters the parameters needed to
// retrieve the default function definition for an Azure Machine Learning web service function.
type AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters struct {
// AzureMachineLearningWebServiceFunctionBindingRetrievalProperties - The binding retrieval properties associated with an Azure Machine learning web service.
*AzureMachineLearningWebServiceFunctionBindingRetrievalProperties `json:"bindingRetrievalProperties,omitempty"`
// BindingType - Possible values include: 'BindingTypeFunctionRetrieveDefaultDefinitionParameters', 'BindingTypeMicrosoftMachineLearningWebService', 'BindingTypeMicrosoftStreamAnalyticsJavascriptUdf'
BindingType BindingType `json:"bindingType,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.
func (amlwsfrddp AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) MarshalJSON() ([]byte, error) {
amlwsfrddp.BindingType = BindingTypeMicrosoftMachineLearningWebService
objectMap := make(map[string]interface{})
if amlwsfrddp.AzureMachineLearningWebServiceFunctionBindingRetrievalProperties != nil {
objectMap["bindingRetrievalProperties"] = amlwsfrddp.AzureMachineLearningWebServiceFunctionBindingRetrievalProperties
}
if amlwsfrddp.BindingType != "" {
objectMap["bindingType"] = amlwsfrddp.BindingType
}
return json.Marshal(objectMap)
}
// AsAzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters is the BasicFunctionRetrieveDefaultDefinitionParameters implementation for AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.
func (amlwsfrddp AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) AsAzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters() (*AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters, bool) {
return &amlwsfrddp, true
}
// AsJavaScriptFunctionRetrieveDefaultDefinitionParameters is the BasicFunctionRetrieveDefaultDefinitionParameters implementation for AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.
func (amlwsfrddp AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) AsJavaScriptFunctionRetrieveDefaultDefinitionParameters() (*JavaScriptFunctionRetrieveDefaultDefinitionParameters, bool) {
return nil, false
}
// AsFunctionRetrieveDefaultDefinitionParameters is the BasicFunctionRetrieveDefaultDefinitionParameters implementation for AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.
func (amlwsfrddp AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) AsFunctionRetrieveDefaultDefinitionParameters() (*FunctionRetrieveDefaultDefinitionParameters, bool) {
return nil, false
}
// AsBasicFunctionRetrieveDefaultDefinitionParameters is the BasicFunctionRetrieveDefaultDefinitionParameters implementation for AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters.
func (amlwsfrddp AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) AsBasicFunctionRetrieveDefaultDefinitionParameters() (BasicFunctionRetrieveDefaultDefinitionParameters, bool) {
return &amlwsfrddp, true
}
// UnmarshalJSON is the custom unmarshaler for AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters struct.
func (amlwsfrddp *AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "bindingRetrievalProperties":
if v != nil {
var azureMachineLearningWebServiceFunctionBindingRetrievalProperties AzureMachineLearningWebServiceFunctionBindingRetrievalProperties
err = json.Unmarshal(*v, &azureMachineLearningWebServiceFunctionBindingRetrievalProperties)
if err != nil {
return err
}
amlwsfrddp.AzureMachineLearningWebServiceFunctionBindingRetrievalProperties = &azureMachineLearningWebServiceFunctionBindingRetrievalProperties
}
case "bindingType":
if v != nil {
var bindingType BindingType
err = json.Unmarshal(*v, &bindingType)
if err != nil {
return err
}
amlwsfrddp.BindingType = bindingType
}
}
}
return nil
}
// AzureMachineLearningWebServiceInputColumn describes an input column for the Azure Machine Learning web
// service endpoint.
type AzureMachineLearningWebServiceInputColumn struct {
// Name - The name of the input column.
Name *string `json:"name,omitempty"`
// DataType - The (Azure Machine Learning supported) data type of the input column. A list of valid Azure Machine Learning data types are described at https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx .
DataType *string `json:"dataType,omitempty"`
// MapTo - The zero based index of the function parameter this input maps to.
MapTo *int32 `json:"mapTo,omitempty"`
}
// AzureMachineLearningWebServiceInputs the inputs for the Azure Machine Learning web service endpoint.
type AzureMachineLearningWebServiceInputs struct {
// Name - The name of the input. This is the name provided while authoring the endpoint.
Name *string `json:"name,omitempty"`
// ColumnNames - A list of input columns for the Azure Machine Learning web service endpoint.
ColumnNames *[]AzureMachineLearningWebServiceInputColumn `json:"columnNames,omitempty"`
}
// AzureMachineLearningWebServiceOutputColumn describes an output column for the Azure Machine Learning web
// service endpoint.
type AzureMachineLearningWebServiceOutputColumn struct {
// Name - The name of the output column.
Name *string `json:"name,omitempty"`
// DataType - The (Azure Machine Learning supported) data type of the output column. A list of valid Azure Machine Learning data types are described at https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx .
DataType *string `json:"dataType,omitempty"`
}
// AzureSQLDatabaseDataSourceProperties the properties that are associated with an Azure SQL database data
// source.
type AzureSQLDatabaseDataSourceProperties struct {
// Server - The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.
Server *string `json:"server,omitempty"`
// Database - The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.
Database *string `json:"database,omitempty"`
// User - The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.
User *string `json:"user,omitempty"`
// Password - The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.
Password *string `json:"password,omitempty"`
// Table - The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.
Table *string `json:"table,omitempty"`
}
// AzureSQLDatabaseOutputDataSource describes an Azure SQL database output data source.
type AzureSQLDatabaseOutputDataSource struct {
// AzureSQLDatabaseOutputDataSourceProperties - The properties that are associated with an Azure SQL database output. Required on PUT (CreateOrReplace) requests.
*AzureSQLDatabaseOutputDataSourceProperties `json:"properties,omitempty"`
// Type - Possible values include: 'TypeOutputDataSource', 'TypeMicrosoftDataLakeAccounts', 'TypePowerBI', 'TypeMicrosoftServiceBusTopic', 'TypeMicrosoftServiceBusQueue', 'TypeMicrosoftStorageDocumentDB', 'TypeMicrosoftSQLServerDatabase', 'TypeMicrosoftServiceBusEventHub', 'TypeMicrosoftStorageTable', 'TypeMicrosoftStorageBlob'
Type TypeBasicOutputDataSource `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) MarshalJSON() ([]byte, error) {
asdods.Type = TypeMicrosoftSQLServerDatabase
objectMap := make(map[string]interface{})
if asdods.AzureSQLDatabaseOutputDataSourceProperties != nil {
objectMap["properties"] = asdods.AzureSQLDatabaseOutputDataSourceProperties
}
if asdods.Type != "" {
objectMap["type"] = asdods.Type
}
return json.Marshal(objectMap)
}
// AsAzureDataLakeStoreOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) {
return nil, false
}
// AsPowerBIOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) {
return nil, false
}
// AsServiceBusTopicOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) {
return nil, false
}
// AsServiceBusQueueOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) {
return nil, false
}
// AsDocumentDbOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) {
return nil, false
}
// AsAzureSQLDatabaseOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) {
return &asdods, true
}
// AsEventHubOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) {
return nil, false
}
// AsAzureTableOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) {
return nil, false
}
// AsBlobOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) {
return nil, false
}
// AsOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsOutputDataSource() (*OutputDataSource, bool) {
return nil, false
}
// AsBasicOutputDataSource is the BasicOutputDataSource implementation for AzureSQLDatabaseOutputDataSource.
func (asdods AzureSQLDatabaseOutputDataSource) AsBasicOutputDataSource() (BasicOutputDataSource, bool) {
return &asdods, true
}
// UnmarshalJSON is the custom unmarshaler for AzureSQLDatabaseOutputDataSource struct.
func (asdods *AzureSQLDatabaseOutputDataSource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var azureSQLDatabaseOutputDataSourceProperties AzureSQLDatabaseOutputDataSourceProperties
err = json.Unmarshal(*v, &azureSQLDatabaseOutputDataSourceProperties)
if err != nil {
return err
}
asdods.AzureSQLDatabaseOutputDataSourceProperties = &azureSQLDatabaseOutputDataSourceProperties
}
case "type":
if v != nil {
var typeVar TypeBasicOutputDataSource
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
asdods.Type = typeVar
}
}
}
return nil
}
// AzureSQLDatabaseOutputDataSourceProperties the properties that are associated with an Azure SQL database
// output.
type AzureSQLDatabaseOutputDataSourceProperties struct {
// Server - The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.
Server *string `json:"server,omitempty"`
// Database - The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.
Database *string `json:"database,omitempty"`
// User - The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.
User *string `json:"user,omitempty"`
// Password - The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.
Password *string `json:"password,omitempty"`
// Table - The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.
Table *string `json:"table,omitempty"`
}
// AzureTableOutputDataSource describes an Azure Table output data source.
type AzureTableOutputDataSource struct {
// AzureTableOutputDataSourceProperties - The properties that are associated with an Azure Table output. Required on PUT (CreateOrReplace) requests.
*AzureTableOutputDataSourceProperties `json:"properties,omitempty"`
// Type - Possible values include: 'TypeOutputDataSource', 'TypeMicrosoftDataLakeAccounts', 'TypePowerBI', 'TypeMicrosoftServiceBusTopic', 'TypeMicrosoftServiceBusQueue', 'TypeMicrosoftStorageDocumentDB', 'TypeMicrosoftSQLServerDatabase', 'TypeMicrosoftServiceBusEventHub', 'TypeMicrosoftStorageTable', 'TypeMicrosoftStorageBlob'
Type TypeBasicOutputDataSource `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) MarshalJSON() ([]byte, error) {
atods.Type = TypeMicrosoftStorageTable
objectMap := make(map[string]interface{})
if atods.AzureTableOutputDataSourceProperties != nil {
objectMap["properties"] = atods.AzureTableOutputDataSourceProperties
}
if atods.Type != "" {
objectMap["type"] = atods.Type
}
return json.Marshal(objectMap)
}
// AsAzureDataLakeStoreOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) {
return nil, false
}
// AsPowerBIOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) {
return nil, false
}
// AsServiceBusTopicOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) {
return nil, false
}
// AsServiceBusQueueOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) {
return nil, false
}
// AsDocumentDbOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) {
return nil, false
}
// AsAzureSQLDatabaseOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) {
return nil, false
}
// AsEventHubOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) {
return nil, false
}
// AsAzureTableOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) {
return &atods, true
}
// AsBlobOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) {
return nil, false
}
// AsOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsOutputDataSource() (*OutputDataSource, bool) {
return nil, false
}
// AsBasicOutputDataSource is the BasicOutputDataSource implementation for AzureTableOutputDataSource.
func (atods AzureTableOutputDataSource) AsBasicOutputDataSource() (BasicOutputDataSource, bool) {
return &atods, true
}
// UnmarshalJSON is the custom unmarshaler for AzureTableOutputDataSource struct.
func (atods *AzureTableOutputDataSource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var azureTableOutputDataSourceProperties AzureTableOutputDataSourceProperties
err = json.Unmarshal(*v, &azureTableOutputDataSourceProperties)
if err != nil {
return err
}
atods.AzureTableOutputDataSourceProperties = &azureTableOutputDataSourceProperties
}
case "type":
if v != nil {
var typeVar TypeBasicOutputDataSource
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
atods.Type = typeVar
}
}
}
return nil
}
// AzureTableOutputDataSourceProperties the properties that are associated with an Azure Table output.
type AzureTableOutputDataSourceProperties struct {
// AccountName - The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
AccountName *string `json:"accountName,omitempty"`
// AccountKey - The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.
AccountKey *string `json:"accountKey,omitempty"`
// Table - The name of the Azure Table. Required on PUT (CreateOrReplace) requests.
Table *string `json:"table,omitempty"`
// PartitionKey - This element indicates the name of a column from the SELECT statement in the query that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.
PartitionKey *string `json:"partitionKey,omitempty"`
// RowKey - This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.
RowKey *string `json:"rowKey,omitempty"`
// ColumnsToRemove - If specified, each item in the array is the name of a column to remove (if present) from output event entities.
ColumnsToRemove *[]string `json:"columnsToRemove,omitempty"`
// BatchSize - The number of rows to write to the Azure Table at a time.
BatchSize *int32 `json:"batchSize,omitempty"`
}
// BlobDataSourceProperties the properties that are associated with a blob data source.
type BlobDataSourceProperties struct {
// StorageAccounts - A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.
StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"`
// Container - The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.
Container *string `json:"container,omitempty"`
// PathPattern - The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.
PathPattern *string `json:"pathPattern,omitempty"`
// DateFormat - The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.
DateFormat *string `json:"dateFormat,omitempty"`
// TimeFormat - The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.
TimeFormat *string `json:"timeFormat,omitempty"`
}
// BlobOutputDataSource describes a blob output data source.
type BlobOutputDataSource struct {
// BlobOutputDataSourceProperties - The properties that are associated with a blob output. Required on PUT (CreateOrReplace) requests.
*BlobOutputDataSourceProperties `json:"properties,omitempty"`
// Type - Possible values include: 'TypeOutputDataSource', 'TypeMicrosoftDataLakeAccounts', 'TypePowerBI', 'TypeMicrosoftServiceBusTopic', 'TypeMicrosoftServiceBusQueue', 'TypeMicrosoftStorageDocumentDB', 'TypeMicrosoftSQLServerDatabase', 'TypeMicrosoftServiceBusEventHub', 'TypeMicrosoftStorageTable', 'TypeMicrosoftStorageBlob'
Type TypeBasicOutputDataSource `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for BlobOutputDataSource.
func (bods BlobOutputDataSource) MarshalJSON() ([]byte, error) {
bods.Type = TypeMicrosoftStorageBlob
objectMap := make(map[string]interface{})
if bods.BlobOutputDataSourceProperties != nil {
objectMap["properties"] = bods.BlobOutputDataSourceProperties
}
if bods.Type != "" {
objectMap["type"] = bods.Type
}
return json.Marshal(objectMap)
}
// AsAzureDataLakeStoreOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) {
return nil, false
}
// AsPowerBIOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) {
return nil, false
}
// AsServiceBusTopicOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) {
return nil, false
}
// AsServiceBusQueueOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) {
return nil, false
}
// AsDocumentDbOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) {
return nil, false
}
// AsAzureSQLDatabaseOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) {
return nil, false
}
// AsEventHubOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) {
return nil, false
}
// AsAzureTableOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) {
return nil, false
}
// AsBlobOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) {
return &bods, true
}
// AsOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsOutputDataSource() (*OutputDataSource, bool) {
return nil, false
}
// AsBasicOutputDataSource is the BasicOutputDataSource implementation for BlobOutputDataSource.
func (bods BlobOutputDataSource) AsBasicOutputDataSource() (BasicOutputDataSource, bool) {
return &bods, true
}
// UnmarshalJSON is the custom unmarshaler for BlobOutputDataSource struct.
func (bods *BlobOutputDataSource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var blobOutputDataSourceProperties BlobOutputDataSourceProperties
err = json.Unmarshal(*v, &blobOutputDataSourceProperties)
if err != nil {
return err
}
bods.BlobOutputDataSourceProperties = &blobOutputDataSourceProperties
}
case "type":
if v != nil {
var typeVar TypeBasicOutputDataSource
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
bods.Type = typeVar
}
}
}
return nil
}
// BlobOutputDataSourceProperties the properties that are associated with a blob output.
type BlobOutputDataSourceProperties struct {
// StorageAccounts - A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.
StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"`
// Container - The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.
Container *string `json:"container,omitempty"`
// PathPattern - The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.
PathPattern *string `json:"pathPattern,omitempty"`
// DateFormat - The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.
DateFormat *string `json:"dateFormat,omitempty"`
// TimeFormat - The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.
TimeFormat *string `json:"timeFormat,omitempty"`
}
// BlobReferenceInputDataSource describes a blob input data source that contains reference data.
type BlobReferenceInputDataSource struct {
// BlobReferenceInputDataSourceProperties - The properties that are associated with a blob input containing reference data. Required on PUT (CreateOrReplace) requests.
*BlobReferenceInputDataSourceProperties `json:"properties,omitempty"`
// Type - Possible values include: 'TypeBasicReferenceInputDataSourceTypeReferenceInputDataSource', 'TypeBasicReferenceInputDataSourceTypeMicrosoftStorageBlob'
Type TypeBasicReferenceInputDataSource `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for BlobReferenceInputDataSource.
func (brids BlobReferenceInputDataSource) MarshalJSON() ([]byte, error) {
brids.Type = TypeBasicReferenceInputDataSourceTypeMicrosoftStorageBlob
objectMap := make(map[string]interface{})
if brids.BlobReferenceInputDataSourceProperties != nil {
objectMap["properties"] = brids.BlobReferenceInputDataSourceProperties
}
if brids.Type != "" {
objectMap["type"] = brids.Type
}
return json.Marshal(objectMap)
}
// AsBlobReferenceInputDataSource is the BasicReferenceInputDataSource implementation for BlobReferenceInputDataSource.
func (brids BlobReferenceInputDataSource) AsBlobReferenceInputDataSource() (*BlobReferenceInputDataSource, bool) {
return &brids, true
}
// AsReferenceInputDataSource is the BasicReferenceInputDataSource implementation for BlobReferenceInputDataSource.
func (brids BlobReferenceInputDataSource) AsReferenceInputDataSource() (*ReferenceInputDataSource, bool) {
return nil, false
}
// AsBasicReferenceInputDataSource is the BasicReferenceInputDataSource implementation for BlobReferenceInputDataSource.
func (brids BlobReferenceInputDataSource) AsBasicReferenceInputDataSource() (BasicReferenceInputDataSource, bool) {
return &brids, true
}
// UnmarshalJSON is the custom unmarshaler for BlobReferenceInputDataSource struct.
func (brids *BlobReferenceInputDataSource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var blobReferenceInputDataSourceProperties BlobReferenceInputDataSourceProperties
err = json.Unmarshal(*v, &blobReferenceInputDataSourceProperties)
if err != nil {
return err
}
brids.BlobReferenceInputDataSourceProperties = &blobReferenceInputDataSourceProperties
}
case "type":
if v != nil {
var typeVar TypeBasicReferenceInputDataSource
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
brids.Type = typeVar
}
}
}
return nil
}
// BlobReferenceInputDataSourceProperties the properties that are associated with a blob input containing
// reference data.
type BlobReferenceInputDataSourceProperties struct {
// StorageAccounts - A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.
StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"`
// Container - The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.
Container *string `json:"container,omitempty"`
// PathPattern - The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.
PathPattern *string `json:"pathPattern,omitempty"`
// DateFormat - The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.
DateFormat *string `json:"dateFormat,omitempty"`
// TimeFormat - The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.
TimeFormat *string `json:"timeFormat,omitempty"`
}
// BlobStreamInputDataSource describes a blob input data source that contains stream data.
type BlobStreamInputDataSource struct {
// BlobStreamInputDataSourceProperties - The properties that are associated with a blob input containing stream data. Required on PUT (CreateOrReplace) requests.
*BlobStreamInputDataSourceProperties `json:"properties,omitempty"`
// Type - Possible values include: 'TypeBasicStreamInputDataSourceTypeStreamInputDataSource', 'TypeBasicStreamInputDataSourceTypeMicrosoftDevicesIotHubs', 'TypeBasicStreamInputDataSourceTypeMicrosoftServiceBusEventHub', 'TypeBasicStreamInputDataSourceTypeMicrosoftStorageBlob'
Type TypeBasicStreamInputDataSource `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for BlobStreamInputDataSource.
func (bsids BlobStreamInputDataSource) MarshalJSON() ([]byte, error) {
bsids.Type = TypeBasicStreamInputDataSourceTypeMicrosoftStorageBlob
objectMap := make(map[string]interface{})
if bsids.BlobStreamInputDataSourceProperties != nil {
objectMap["properties"] = bsids.BlobStreamInputDataSourceProperties
}
if bsids.Type != "" {
objectMap["type"] = bsids.Type
}
return json.Marshal(objectMap)
}
// AsIoTHubStreamInputDataSource is the BasicStreamInputDataSource implementation for BlobStreamInputDataSource.
func (bsids BlobStreamInputDataSource) AsIoTHubStreamInputDataSource() (*IoTHubStreamInputDataSource, bool) {
return nil, false
}
// AsEventHubStreamInputDataSource is the BasicStreamInputDataSource implementation for BlobStreamInputDataSource.
func (bsids BlobStreamInputDataSource) AsEventHubStreamInputDataSource() (*EventHubStreamInputDataSource, bool) {
return nil, false
}
// AsBlobStreamInputDataSource is the BasicStreamInputDataSource implementation for BlobStreamInputDataSource.
func (bsids BlobStreamInputDataSource) AsBlobStreamInputDataSource() (*BlobStreamInputDataSource, bool) {
return &bsids, true
}
// AsStreamInputDataSource is the BasicStreamInputDataSource implementation for BlobStreamInputDataSource.
func (bsids BlobStreamInputDataSource) AsStreamInputDataSource() (*StreamInputDataSource, bool) {
return nil, false
}
// AsBasicStreamInputDataSource is the BasicStreamInputDataSource implementation for BlobStreamInputDataSource.
func (bsids BlobStreamInputDataSource) AsBasicStreamInputDataSource() (BasicStreamInputDataSource, bool) {
return &bsids, true
}
// UnmarshalJSON is the custom unmarshaler for BlobStreamInputDataSource struct.
func (bsids *BlobStreamInputDataSource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var blobStreamInputDataSourceProperties BlobStreamInputDataSourceProperties
err = json.Unmarshal(*v, &blobStreamInputDataSourceProperties)
if err != nil {
return err
}
bsids.BlobStreamInputDataSourceProperties = &blobStreamInputDataSourceProperties
}
case "type":
if v != nil {
var typeVar TypeBasicStreamInputDataSource
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
bsids.Type = typeVar
}
}
}
return nil
}
// BlobStreamInputDataSourceProperties the properties that are associated with a blob input containing
// stream data.
type BlobStreamInputDataSourceProperties struct {
// SourcePartitionCount - The partition count of the blob input data source. Range 1 - 256.
SourcePartitionCount *int32 `json:"sourcePartitionCount,omitempty"`
// StorageAccounts - A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.
StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"`
// Container - The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.
Container *string `json:"container,omitempty"`
// PathPattern - The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.
PathPattern *string `json:"pathPattern,omitempty"`
// DateFormat - The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.
DateFormat *string `json:"dateFormat,omitempty"`
// TimeFormat - The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.
TimeFormat *string `json:"timeFormat,omitempty"`
}
// CsvSerialization describes how data from an input is serialized or how data is serialized when written
// to an output in CSV format.
type CsvSerialization struct {
// CsvSerializationProperties - The properties that are associated with the CSV serialization type. Required on PUT (CreateOrReplace) requests.
*CsvSerializationProperties `json:"properties,omitempty"`
// Type - Possible values include: 'TypeSerialization', 'TypeAvro', 'TypeJSON', 'TypeCsv'
Type Type `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for CsvSerialization.
func (cs CsvSerialization) MarshalJSON() ([]byte, error) {
cs.Type = TypeCsv
objectMap := make(map[string]interface{})
if cs.CsvSerializationProperties != nil {
objectMap["properties"] = cs.CsvSerializationProperties
}
if cs.Type != "" {