@azure/ai-language-text 1.0.0-alpha.20220808.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +780 -0
  3. package/dist/index.js +4771 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist-esm/src/azureKeyCredentialPolicy.js +22 -0
  6. package/dist-esm/src/azureKeyCredentialPolicy.js.map +1 -0
  7. package/dist-esm/src/constants.js +16 -0
  8. package/dist-esm/src/constants.js.map +1 -0
  9. package/dist-esm/src/generated/generatedClient.js +119 -0
  10. package/dist-esm/src/generated/generatedClient.js.map +1 -0
  11. package/dist-esm/src/generated/index.js +11 -0
  12. package/dist-esm/src/generated/index.js.map +1 -0
  13. package/dist-esm/src/generated/models/index.js +644 -0
  14. package/dist-esm/src/generated/models/index.js.map +1 -0
  15. package/dist-esm/src/generated/models/mappers.js +2810 -0
  16. package/dist-esm/src/generated/models/mappers.js.map +1 -0
  17. package/dist-esm/src/generated/models/parameters.js +98 -0
  18. package/dist-esm/src/generated/models/parameters.js.map +1 -0
  19. package/dist-esm/src/generated/operations/analyzeText.js +105 -0
  20. package/dist-esm/src/generated/operations/analyzeText.js.map +1 -0
  21. package/dist-esm/src/generated/operations/index.js +9 -0
  22. package/dist-esm/src/generated/operations/index.js.map +1 -0
  23. package/dist-esm/src/generated/operationsInterfaces/analyzeText.js +9 -0
  24. package/dist-esm/src/generated/operationsInterfaces/analyzeText.js.map +1 -0
  25. package/dist-esm/src/generated/operationsInterfaces/index.js +9 -0
  26. package/dist-esm/src/generated/operationsInterfaces/index.js.map +1 -0
  27. package/dist-esm/src/index.js +18 -0
  28. package/dist-esm/src/index.js.map +1 -0
  29. package/dist-esm/src/logger.js +9 -0
  30. package/dist-esm/src/logger.js.map +1 -0
  31. package/dist-esm/src/lro.js +179 -0
  32. package/dist-esm/src/lro.js.map +1 -0
  33. package/dist-esm/src/models.js +42 -0
  34. package/dist-esm/src/models.js.map +1 -0
  35. package/dist-esm/src/textAnalysisClient.js +191 -0
  36. package/dist-esm/src/textAnalysisClient.js.map +1 -0
  37. package/dist-esm/src/transforms.js +287 -0
  38. package/dist-esm/src/transforms.js.map +1 -0
  39. package/dist-esm/src/util.js +117 -0
  40. package/dist-esm/src/util.js.map +1 -0
  41. package/package.json +135 -0
  42. package/types/ai-language-text.d.ts +2477 -0
package/dist/index.js ADDED
@@ -0,0 +1,4771 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var coreAuth = require('@azure/core-auth');
6
+ var tslib = require('tslib');
7
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
8
+ var coreLro = require('@azure/core-lro');
9
+ var coreTracing = require('@azure/core-tracing');
10
+ var logger$1 = require('@azure/logger');
11
+ var coreClient = require('@azure/core-client');
12
+ var corePaging = require('@azure/core-paging');
13
+
14
+ function _interopNamespace(e) {
15
+ if (e && e.__esModule) return e;
16
+ var n = Object.create(null);
17
+ if (e) {
18
+ Object.keys(e).forEach(function (k) {
19
+ if (k !== 'default') {
20
+ var d = Object.getOwnPropertyDescriptor(e, k);
21
+ Object.defineProperty(n, k, d.get ? d : {
22
+ enumerable: true,
23
+ get: function () { return e[k]; }
24
+ });
25
+ }
26
+ });
27
+ }
28
+ n["default"] = e;
29
+ return Object.freeze(n);
30
+ }
31
+
32
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
33
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
34
+
35
+ // Copyright (c) Microsoft Corporation.
36
+ // Licensed under the MIT license.
37
+ /**
38
+ * The default AAD permissions scope for Cognitive Services.
39
+ * @internal
40
+ */
41
+ const DEFAULT_COGNITIVE_SCOPE = "https://cognitiveservices.azure.com/.default";
42
+ /**
43
+ * @internal
44
+ */
45
+ const SDK_VERSION = "1.0.0-beta.1";
46
+ /**
47
+ * @internal
48
+ */
49
+ const clientName = "TextAnalysisClient";
50
+
51
+ // Copyright (c) Microsoft Corporation.
52
+ /**
53
+ * The `@azure/logger` configuration for this package.
54
+ * @internal
55
+ */
56
+ const logger = logger$1.createClientLogger("ai-language-text");
57
+
58
+ // Copyright (c) Microsoft Corporation.
59
+ /**
60
+ * Given a sorted array of input objects (with a unique ID) and an unsorted array of results,
61
+ * return a sorted array of results.
62
+ *
63
+ * @internal
64
+ * @param sortedArray - An array of entries sorted by `id`
65
+ * @param unsortedArray - An array of entries that contain `id` but are not sorted
66
+ */
67
+ function sortResponseIdObjects(sortedArray, unsortedArray) {
68
+ const unsortedMap = new Map();
69
+ for (const item of unsortedArray) {
70
+ unsortedMap.set(item.id, item);
71
+ }
72
+ if (unsortedArray.length !== sortedArray.length) {
73
+ const ordinal = unsortedArray.length > sortedArray.length ? "more" : "fewer";
74
+ logger.warning(`The service returned ${ordinal} responses than inputs. Some errors may be treated as fatal.`);
75
+ }
76
+ const result = [];
77
+ /**
78
+ * When the results are returned in pages, sortedArray will probably have more
79
+ * items than unsortedArray so it is ok to ignore the case when a sorted item
80
+ * ID is not found in `unsortedMap`.
81
+ */
82
+ for (const sortedItem of sortedArray) {
83
+ const item = unsortedMap.get(sortedItem.id);
84
+ if (item) {
85
+ result.push(item);
86
+ }
87
+ }
88
+ return result;
89
+ }
90
+ /**
91
+ * @internal
92
+ */
93
+ function parseAssessmentIndex(pointer) {
94
+ const regex = new RegExp(/#\/documents\/(\d+)\/sentences\/(\d+)\/assessments\/(\d+)/);
95
+ const res = regex.exec(pointer);
96
+ if (res !== null) {
97
+ const assessmentIndex = {
98
+ document: parseInt(res[1]),
99
+ sentence: parseInt(res[2]),
100
+ assessment: parseInt(res[3]),
101
+ };
102
+ return assessmentIndex;
103
+ }
104
+ else {
105
+ throw new Error(`Pointer "${pointer}" is not a valid Assessment pointer`);
106
+ }
107
+ }
108
+ /**
109
+ * Parses the index of the healthcare entity from a JSON pointer.
110
+ * @param pointer - a JSON pointer representing an entity
111
+ * @internal
112
+ */
113
+ function parseHealthcareEntityIndex(pointer) {
114
+ const regex = new RegExp(/#\/results\/documents\/(\d+)\/entities\/(\d+)/);
115
+ const res = regex.exec(pointer);
116
+ if (res !== null) {
117
+ return parseInt(res[2]);
118
+ }
119
+ else {
120
+ throw new Error(`Pointer "${pointer}" is not a valid healthcare entity pointer`);
121
+ }
122
+ }
123
+ /**
124
+ * @internal
125
+ */
126
+ function isStringArray(documents) {
127
+ return typeof documents[0] === "string";
128
+ }
129
+ /**
130
+ * @internal
131
+ */
132
+ function convertToTextDocumentInput(inputs, language) {
133
+ return inputs.map((text, index) => {
134
+ return {
135
+ id: String(index),
136
+ language,
137
+ text,
138
+ };
139
+ });
140
+ }
141
+ /**
142
+ * @internal
143
+ */
144
+ function convertToLanguageDetectionInput(inputs, countryHint) {
145
+ return inputs.map((text, index) => {
146
+ return {
147
+ id: String(index),
148
+ countryHint,
149
+ text,
150
+ };
151
+ });
152
+ }
153
+ /**
154
+ * @internal
155
+ */
156
+ function getOperationOptions(options) {
157
+ const { abortSignal, apiVersion, includeStatistics, onResponse, requestOptions, serializerOptions, tracingOptions } = options, rest = tslib.__rest(options, ["abortSignal", "apiVersion", "includeStatistics", "onResponse", "requestOptions", "serializerOptions", "tracingOptions"]);
158
+ return {
159
+ options: {
160
+ abortSignal,
161
+ apiVersion,
162
+ includeStatistics,
163
+ onResponse,
164
+ requestOptions,
165
+ serializerOptions,
166
+ tracingOptions,
167
+ },
168
+ rest,
169
+ };
170
+ }
171
+
172
+ /*
173
+ * Copyright (c) Microsoft Corporation.
174
+ * Licensed under the MIT License.
175
+ *
176
+ * Code generated by Microsoft (R) AutoRest Code Generator.
177
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
178
+ */
179
+ const AnalyzeAction = {
180
+ type: {
181
+ name: "Composite",
182
+ className: "AnalyzeAction",
183
+ uberParent: "AnalyzeAction",
184
+ polymorphicDiscriminator: {
185
+ serializedName: "kind",
186
+ clientName: "kind"
187
+ },
188
+ modelProperties: {
189
+ kind: {
190
+ serializedName: "kind",
191
+ required: true,
192
+ type: {
193
+ name: "String"
194
+ }
195
+ }
196
+ }
197
+ }
198
+ };
199
+ const AnalyzeTextTaskResult = {
200
+ type: {
201
+ name: "Composite",
202
+ className: "AnalyzeTextTaskResult",
203
+ uberParent: "AnalyzeTextTaskResult",
204
+ polymorphicDiscriminator: {
205
+ serializedName: "kind",
206
+ clientName: "kind"
207
+ },
208
+ modelProperties: {
209
+ kind: {
210
+ serializedName: "kind",
211
+ required: true,
212
+ type: {
213
+ name: "String"
214
+ }
215
+ }
216
+ }
217
+ }
218
+ };
219
+ const ErrorResponse = {
220
+ type: {
221
+ name: "Composite",
222
+ className: "ErrorResponse",
223
+ modelProperties: {
224
+ error: {
225
+ serializedName: "error",
226
+ type: {
227
+ name: "Composite",
228
+ className: "ErrorModel"
229
+ }
230
+ }
231
+ }
232
+ }
233
+ };
234
+ const ErrorModel = {
235
+ type: {
236
+ name: "Composite",
237
+ className: "ErrorModel",
238
+ additionalProperties: { type: { name: "Object" } },
239
+ modelProperties: {
240
+ code: {
241
+ serializedName: "code",
242
+ required: true,
243
+ type: {
244
+ name: "String"
245
+ }
246
+ },
247
+ message: {
248
+ serializedName: "message",
249
+ required: true,
250
+ type: {
251
+ name: "String"
252
+ }
253
+ },
254
+ target: {
255
+ serializedName: "target",
256
+ type: {
257
+ name: "String"
258
+ }
259
+ },
260
+ details: {
261
+ serializedName: "details",
262
+ type: {
263
+ name: "Sequence",
264
+ element: {
265
+ type: {
266
+ name: "Composite",
267
+ className: "ErrorModel"
268
+ }
269
+ }
270
+ }
271
+ },
272
+ innererror: {
273
+ serializedName: "innererror",
274
+ type: {
275
+ name: "Composite",
276
+ className: "InnerErrorModel"
277
+ }
278
+ }
279
+ }
280
+ }
281
+ };
282
+ const InnerErrorModel = {
283
+ type: {
284
+ name: "Composite",
285
+ className: "InnerErrorModel",
286
+ modelProperties: {
287
+ code: {
288
+ serializedName: "code",
289
+ required: true,
290
+ type: {
291
+ name: "String"
292
+ }
293
+ },
294
+ message: {
295
+ serializedName: "message",
296
+ required: true,
297
+ type: {
298
+ name: "String"
299
+ }
300
+ },
301
+ details: {
302
+ serializedName: "details",
303
+ type: {
304
+ name: "Dictionary",
305
+ value: { type: { name: "String" } }
306
+ }
307
+ },
308
+ target: {
309
+ serializedName: "target",
310
+ type: {
311
+ name: "String"
312
+ }
313
+ },
314
+ innererror: {
315
+ serializedName: "innererror",
316
+ type: {
317
+ name: "Composite",
318
+ className: "InnerErrorModel"
319
+ }
320
+ }
321
+ }
322
+ }
323
+ };
324
+ const AnalyzeTextJobsInput = {
325
+ type: {
326
+ name: "Composite",
327
+ className: "AnalyzeTextJobsInput",
328
+ modelProperties: {
329
+ displayName: {
330
+ serializedName: "displayName",
331
+ type: {
332
+ name: "String"
333
+ }
334
+ },
335
+ analysisInput: {
336
+ serializedName: "analysisInput",
337
+ type: {
338
+ name: "Composite",
339
+ className: "MultiLanguageAnalysisInput"
340
+ }
341
+ },
342
+ tasks: {
343
+ serializedName: "tasks",
344
+ required: true,
345
+ type: {
346
+ name: "Sequence",
347
+ element: {
348
+ type: {
349
+ name: "Composite",
350
+ className: "AnalyzeBatchAction"
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+ }
357
+ };
358
+ const MultiLanguageAnalysisInput = {
359
+ type: {
360
+ name: "Composite",
361
+ className: "MultiLanguageAnalysisInput",
362
+ modelProperties: {
363
+ documents: {
364
+ serializedName: "documents",
365
+ type: {
366
+ name: "Sequence",
367
+ element: {
368
+ type: {
369
+ name: "Composite",
370
+ className: "TextDocumentInput"
371
+ }
372
+ }
373
+ }
374
+ }
375
+ }
376
+ }
377
+ };
378
+ const TextDocumentInput = {
379
+ type: {
380
+ name: "Composite",
381
+ className: "TextDocumentInput",
382
+ modelProperties: {
383
+ id: {
384
+ serializedName: "id",
385
+ required: true,
386
+ type: {
387
+ name: "String"
388
+ }
389
+ },
390
+ text: {
391
+ serializedName: "text",
392
+ required: true,
393
+ type: {
394
+ name: "String"
395
+ }
396
+ },
397
+ language: {
398
+ serializedName: "language",
399
+ type: {
400
+ name: "String"
401
+ }
402
+ }
403
+ }
404
+ }
405
+ };
406
+ const BatchActionState = {
407
+ type: {
408
+ name: "Composite",
409
+ className: "BatchActionState",
410
+ modelProperties: {
411
+ actionName: {
412
+ serializedName: "taskName",
413
+ type: {
414
+ name: "String"
415
+ }
416
+ }
417
+ }
418
+ }
419
+ };
420
+ const JobState = {
421
+ type: {
422
+ name: "Composite",
423
+ className: "JobState",
424
+ modelProperties: {
425
+ displayName: {
426
+ serializedName: "displayName",
427
+ type: {
428
+ name: "String"
429
+ }
430
+ },
431
+ createdOn: {
432
+ serializedName: "createdDateTime",
433
+ required: true,
434
+ type: {
435
+ name: "DateTime"
436
+ }
437
+ },
438
+ expiresOn: {
439
+ serializedName: "expirationDateTime",
440
+ type: {
441
+ name: "DateTime"
442
+ }
443
+ },
444
+ id: {
445
+ serializedName: "jobId",
446
+ required: true,
447
+ type: {
448
+ name: "Uuid"
449
+ }
450
+ },
451
+ modifiedOn: {
452
+ serializedName: "lastUpdateDateTime",
453
+ required: true,
454
+ type: {
455
+ name: "DateTime"
456
+ }
457
+ },
458
+ status: {
459
+ serializedName: "status",
460
+ required: true,
461
+ type: {
462
+ name: "Enum",
463
+ allowedValues: [
464
+ "notStarted",
465
+ "running",
466
+ "succeeded",
467
+ "partiallySucceeded",
468
+ "failed",
469
+ "cancelled",
470
+ "cancelling"
471
+ ]
472
+ }
473
+ },
474
+ errors: {
475
+ serializedName: "errors",
476
+ type: {
477
+ name: "Sequence",
478
+ element: {
479
+ type: {
480
+ name: "Composite",
481
+ className: "ErrorModel"
482
+ }
483
+ }
484
+ }
485
+ },
486
+ nextLink: {
487
+ serializedName: "nextLink",
488
+ type: {
489
+ name: "String"
490
+ }
491
+ }
492
+ }
493
+ }
494
+ };
495
+ const TasksState = {
496
+ type: {
497
+ name: "Composite",
498
+ className: "TasksState",
499
+ modelProperties: {
500
+ tasks: {
501
+ serializedName: "tasks",
502
+ type: {
503
+ name: "Composite",
504
+ className: "TasksStateTasks"
505
+ }
506
+ }
507
+ }
508
+ }
509
+ };
510
+ const TasksStateTasks = {
511
+ type: {
512
+ name: "Composite",
513
+ className: "TasksStateTasks",
514
+ modelProperties: {
515
+ completed: {
516
+ serializedName: "completed",
517
+ required: true,
518
+ type: {
519
+ name: "Number"
520
+ }
521
+ },
522
+ failed: {
523
+ serializedName: "failed",
524
+ required: true,
525
+ type: {
526
+ name: "Number"
527
+ }
528
+ },
529
+ inProgress: {
530
+ serializedName: "inProgress",
531
+ required: true,
532
+ type: {
533
+ name: "Number"
534
+ }
535
+ },
536
+ total: {
537
+ serializedName: "total",
538
+ required: true,
539
+ type: {
540
+ name: "Number"
541
+ }
542
+ },
543
+ items: {
544
+ serializedName: "items",
545
+ type: {
546
+ name: "Sequence",
547
+ element: {
548
+ type: {
549
+ name: "Composite",
550
+ className: "AnalyzeTextLROResult"
551
+ }
552
+ }
553
+ }
554
+ }
555
+ }
556
+ }
557
+ };
558
+ const TaskState = {
559
+ type: {
560
+ name: "Composite",
561
+ className: "TaskState",
562
+ modelProperties: {
563
+ lastUpdateDateTime: {
564
+ serializedName: "lastUpdateDateTime",
565
+ required: true,
566
+ type: {
567
+ name: "DateTime"
568
+ }
569
+ },
570
+ status: {
571
+ serializedName: "status",
572
+ required: true,
573
+ type: {
574
+ name: "Enum",
575
+ allowedValues: [
576
+ "notStarted",
577
+ "running",
578
+ "succeeded",
579
+ "partiallySucceeded",
580
+ "failed",
581
+ "cancelled",
582
+ "cancelling"
583
+ ]
584
+ }
585
+ }
586
+ }
587
+ }
588
+ };
589
+ const AnalyzeTextJobStatistics = {
590
+ type: {
591
+ name: "Composite",
592
+ className: "AnalyzeTextJobStatistics",
593
+ modelProperties: {
594
+ statistics: {
595
+ serializedName: "statistics",
596
+ type: {
597
+ name: "Composite",
598
+ className: "TextDocumentBatchStatistics"
599
+ }
600
+ }
601
+ }
602
+ }
603
+ };
604
+ const TextDocumentBatchStatistics = {
605
+ type: {
606
+ name: "Composite",
607
+ className: "TextDocumentBatchStatistics",
608
+ modelProperties: {
609
+ documentCount: {
610
+ serializedName: "documentsCount",
611
+ required: true,
612
+ type: {
613
+ name: "Number"
614
+ }
615
+ },
616
+ validDocumentCount: {
617
+ serializedName: "validDocumentsCount",
618
+ required: true,
619
+ type: {
620
+ name: "Number"
621
+ }
622
+ },
623
+ erroneousDocumentCount: {
624
+ serializedName: "erroneousDocumentsCount",
625
+ required: true,
626
+ type: {
627
+ name: "Number"
628
+ }
629
+ },
630
+ transactionCount: {
631
+ serializedName: "transactionsCount",
632
+ required: true,
633
+ type: {
634
+ name: "Number"
635
+ }
636
+ }
637
+ }
638
+ }
639
+ };
640
+ const LanguageDetectionAnalysisInput = {
641
+ type: {
642
+ name: "Composite",
643
+ className: "LanguageDetectionAnalysisInput",
644
+ modelProperties: {
645
+ documents: {
646
+ serializedName: "documents",
647
+ type: {
648
+ name: "Sequence",
649
+ element: {
650
+ type: {
651
+ name: "Composite",
652
+ className: "LanguageDetectionInput"
653
+ }
654
+ }
655
+ }
656
+ }
657
+ }
658
+ }
659
+ };
660
+ const LanguageDetectionInput = {
661
+ type: {
662
+ name: "Composite",
663
+ className: "LanguageDetectionInput",
664
+ modelProperties: {
665
+ id: {
666
+ serializedName: "id",
667
+ required: true,
668
+ type: {
669
+ name: "String"
670
+ }
671
+ },
672
+ text: {
673
+ serializedName: "text",
674
+ required: true,
675
+ type: {
676
+ name: "String"
677
+ }
678
+ },
679
+ countryHint: {
680
+ serializedName: "countryHint",
681
+ type: {
682
+ name: "String"
683
+ }
684
+ }
685
+ }
686
+ }
687
+ };
688
+ const ActionCommon = {
689
+ type: {
690
+ name: "Composite",
691
+ className: "ActionCommon",
692
+ modelProperties: {
693
+ disableServiceLogs: {
694
+ defaultValue: false,
695
+ serializedName: "loggingOptOut",
696
+ type: {
697
+ name: "Boolean"
698
+ }
699
+ }
700
+ }
701
+ }
702
+ };
703
+ const PreBuiltResult = {
704
+ type: {
705
+ name: "Composite",
706
+ className: "PreBuiltResult",
707
+ modelProperties: {
708
+ errors: {
709
+ serializedName: "errors",
710
+ required: true,
711
+ type: {
712
+ name: "Sequence",
713
+ element: {
714
+ type: {
715
+ name: "Composite",
716
+ className: "DocumentError"
717
+ }
718
+ }
719
+ }
720
+ },
721
+ statistics: {
722
+ serializedName: "statistics",
723
+ type: {
724
+ name: "Composite",
725
+ className: "TextDocumentBatchStatistics"
726
+ }
727
+ },
728
+ modelVersion: {
729
+ serializedName: "modelVersion",
730
+ required: true,
731
+ type: {
732
+ name: "String"
733
+ }
734
+ }
735
+ }
736
+ }
737
+ };
738
+ const DocumentError = {
739
+ type: {
740
+ name: "Composite",
741
+ className: "DocumentError",
742
+ modelProperties: {
743
+ id: {
744
+ serializedName: "id",
745
+ required: true,
746
+ type: {
747
+ name: "String"
748
+ }
749
+ },
750
+ error: {
751
+ serializedName: "error",
752
+ type: {
753
+ name: "Composite",
754
+ className: "ErrorModel"
755
+ }
756
+ }
757
+ }
758
+ }
759
+ };
760
+ const CustomResult = {
761
+ type: {
762
+ name: "Composite",
763
+ className: "CustomResult",
764
+ modelProperties: {
765
+ errors: {
766
+ serializedName: "errors",
767
+ required: true,
768
+ type: {
769
+ name: "Sequence",
770
+ element: {
771
+ type: {
772
+ name: "Composite",
773
+ className: "DocumentError"
774
+ }
775
+ }
776
+ }
777
+ },
778
+ statistics: {
779
+ serializedName: "statistics",
780
+ type: {
781
+ name: "Composite",
782
+ className: "TextDocumentBatchStatistics"
783
+ }
784
+ },
785
+ projectName: {
786
+ serializedName: "projectName",
787
+ required: true,
788
+ type: {
789
+ name: "String"
790
+ }
791
+ },
792
+ deploymentName: {
793
+ serializedName: "deploymentName",
794
+ required: true,
795
+ type: {
796
+ name: "String"
797
+ }
798
+ }
799
+ }
800
+ }
801
+ };
802
+ const Entity = {
803
+ type: {
804
+ name: "Composite",
805
+ className: "Entity",
806
+ modelProperties: {
807
+ text: {
808
+ serializedName: "text",
809
+ required: true,
810
+ type: {
811
+ name: "String"
812
+ }
813
+ },
814
+ category: {
815
+ serializedName: "category",
816
+ required: true,
817
+ type: {
818
+ name: "String"
819
+ }
820
+ },
821
+ subCategory: {
822
+ serializedName: "subcategory",
823
+ type: {
824
+ name: "String"
825
+ }
826
+ },
827
+ offset: {
828
+ serializedName: "offset",
829
+ required: true,
830
+ type: {
831
+ name: "Number"
832
+ }
833
+ },
834
+ length: {
835
+ serializedName: "length",
836
+ required: true,
837
+ type: {
838
+ name: "Number"
839
+ }
840
+ },
841
+ confidenceScore: {
842
+ serializedName: "confidenceScore",
843
+ required: true,
844
+ type: {
845
+ name: "Number"
846
+ }
847
+ }
848
+ }
849
+ }
850
+ };
851
+ const DocumentResult = {
852
+ type: {
853
+ name: "Composite",
854
+ className: "DocumentResult",
855
+ modelProperties: {
856
+ id: {
857
+ serializedName: "id",
858
+ required: true,
859
+ type: {
860
+ name: "String"
861
+ }
862
+ },
863
+ warnings: {
864
+ serializedName: "warnings",
865
+ required: true,
866
+ type: {
867
+ name: "Sequence",
868
+ element: {
869
+ type: {
870
+ name: "Composite",
871
+ className: "DocumentWarning"
872
+ }
873
+ }
874
+ }
875
+ },
876
+ statistics: {
877
+ serializedName: "statistics",
878
+ type: {
879
+ name: "Composite",
880
+ className: "TextDocumentStatistics"
881
+ }
882
+ }
883
+ }
884
+ }
885
+ };
886
+ const DocumentWarning = {
887
+ type: {
888
+ name: "Composite",
889
+ className: "DocumentWarning",
890
+ modelProperties: {
891
+ code: {
892
+ serializedName: "code",
893
+ required: true,
894
+ type: {
895
+ name: "String"
896
+ }
897
+ },
898
+ message: {
899
+ serializedName: "message",
900
+ required: true,
901
+ type: {
902
+ name: "String"
903
+ }
904
+ }
905
+ }
906
+ }
907
+ };
908
+ const TextDocumentStatistics = {
909
+ type: {
910
+ name: "Composite",
911
+ className: "TextDocumentStatistics",
912
+ modelProperties: {
913
+ characterCount: {
914
+ serializedName: "charactersCount",
915
+ required: true,
916
+ type: {
917
+ name: "Number"
918
+ }
919
+ },
920
+ transactionCount: {
921
+ serializedName: "transactionsCount",
922
+ required: true,
923
+ type: {
924
+ name: "Number"
925
+ }
926
+ }
927
+ }
928
+ }
929
+ };
930
+ const ClassificationCategory = {
931
+ type: {
932
+ name: "Composite",
933
+ className: "ClassificationCategory",
934
+ modelProperties: {
935
+ category: {
936
+ serializedName: "category",
937
+ required: true,
938
+ type: {
939
+ name: "String"
940
+ }
941
+ },
942
+ confidenceScore: {
943
+ serializedName: "confidenceScore",
944
+ required: true,
945
+ type: {
946
+ name: "Number"
947
+ }
948
+ }
949
+ }
950
+ }
951
+ };
952
+ const HealthcareEntity = {
953
+ type: {
954
+ name: "Composite",
955
+ className: "HealthcareEntity",
956
+ modelProperties: {
957
+ text: {
958
+ serializedName: "text",
959
+ required: true,
960
+ type: {
961
+ name: "String"
962
+ }
963
+ },
964
+ category: {
965
+ serializedName: "category",
966
+ required: true,
967
+ type: {
968
+ name: "String"
969
+ }
970
+ },
971
+ subCategory: {
972
+ serializedName: "subcategory",
973
+ type: {
974
+ name: "String"
975
+ }
976
+ },
977
+ offset: {
978
+ serializedName: "offset",
979
+ required: true,
980
+ type: {
981
+ name: "Number"
982
+ }
983
+ },
984
+ length: {
985
+ serializedName: "length",
986
+ required: true,
987
+ type: {
988
+ name: "Number"
989
+ }
990
+ },
991
+ confidenceScore: {
992
+ serializedName: "confidenceScore",
993
+ required: true,
994
+ type: {
995
+ name: "Number"
996
+ }
997
+ },
998
+ assertion: {
999
+ serializedName: "assertion",
1000
+ type: {
1001
+ name: "Composite",
1002
+ className: "HealthcareAssertion"
1003
+ }
1004
+ },
1005
+ normalizedText: {
1006
+ serializedName: "name",
1007
+ type: {
1008
+ name: "String"
1009
+ }
1010
+ },
1011
+ dataSources: {
1012
+ serializedName: "links",
1013
+ type: {
1014
+ name: "Sequence",
1015
+ element: {
1016
+ type: {
1017
+ name: "Composite",
1018
+ className: "EntityDataSource"
1019
+ }
1020
+ }
1021
+ }
1022
+ }
1023
+ }
1024
+ }
1025
+ };
1026
+ const HealthcareAssertion = {
1027
+ type: {
1028
+ name: "Composite",
1029
+ className: "HealthcareAssertion",
1030
+ modelProperties: {
1031
+ conditionality: {
1032
+ serializedName: "conditionality",
1033
+ type: {
1034
+ name: "Enum",
1035
+ allowedValues: ["hypothetical", "conditional"]
1036
+ }
1037
+ },
1038
+ certainty: {
1039
+ serializedName: "certainty",
1040
+ type: {
1041
+ name: "Enum",
1042
+ allowedValues: [
1043
+ "positive",
1044
+ "positivePossible",
1045
+ "neutralPossible",
1046
+ "negativePossible",
1047
+ "negative"
1048
+ ]
1049
+ }
1050
+ },
1051
+ association: {
1052
+ serializedName: "association",
1053
+ type: {
1054
+ name: "Enum",
1055
+ allowedValues: ["subject", "other"]
1056
+ }
1057
+ }
1058
+ }
1059
+ }
1060
+ };
1061
+ const EntityDataSource = {
1062
+ type: {
1063
+ name: "Composite",
1064
+ className: "EntityDataSource",
1065
+ modelProperties: {
1066
+ name: {
1067
+ serializedName: "dataSource",
1068
+ required: true,
1069
+ type: {
1070
+ name: "String"
1071
+ }
1072
+ },
1073
+ entityId: {
1074
+ serializedName: "id",
1075
+ required: true,
1076
+ type: {
1077
+ name: "String"
1078
+ }
1079
+ }
1080
+ }
1081
+ }
1082
+ };
1083
+ const HealthcareRelation = {
1084
+ type: {
1085
+ name: "Composite",
1086
+ className: "HealthcareRelation",
1087
+ modelProperties: {
1088
+ relationType: {
1089
+ serializedName: "relationType",
1090
+ required: true,
1091
+ type: {
1092
+ name: "String"
1093
+ }
1094
+ },
1095
+ entities: {
1096
+ serializedName: "entities",
1097
+ required: true,
1098
+ type: {
1099
+ name: "Sequence",
1100
+ element: {
1101
+ type: {
1102
+ name: "Composite",
1103
+ className: "HealthcareRelationEntity"
1104
+ }
1105
+ }
1106
+ }
1107
+ }
1108
+ }
1109
+ }
1110
+ };
1111
+ const HealthcareRelationEntity = {
1112
+ type: {
1113
+ name: "Composite",
1114
+ className: "HealthcareRelationEntity",
1115
+ modelProperties: {
1116
+ ref: {
1117
+ serializedName: "ref",
1118
+ required: true,
1119
+ type: {
1120
+ name: "String"
1121
+ }
1122
+ },
1123
+ role: {
1124
+ serializedName: "role",
1125
+ required: true,
1126
+ type: {
1127
+ name: "String"
1128
+ }
1129
+ }
1130
+ }
1131
+ }
1132
+ };
1133
+ const SentimentConfidenceScores = {
1134
+ type: {
1135
+ name: "Composite",
1136
+ className: "SentimentConfidenceScores",
1137
+ modelProperties: {
1138
+ positive: {
1139
+ serializedName: "positive",
1140
+ required: true,
1141
+ type: {
1142
+ name: "Number"
1143
+ }
1144
+ },
1145
+ neutral: {
1146
+ serializedName: "neutral",
1147
+ required: true,
1148
+ type: {
1149
+ name: "Number"
1150
+ }
1151
+ },
1152
+ negative: {
1153
+ serializedName: "negative",
1154
+ required: true,
1155
+ type: {
1156
+ name: "Number"
1157
+ }
1158
+ }
1159
+ }
1160
+ }
1161
+ };
1162
+ const SentenceSentiment = {
1163
+ type: {
1164
+ name: "Composite",
1165
+ className: "SentenceSentiment",
1166
+ modelProperties: {
1167
+ text: {
1168
+ serializedName: "text",
1169
+ required: true,
1170
+ type: {
1171
+ name: "String"
1172
+ }
1173
+ },
1174
+ sentiment: {
1175
+ serializedName: "sentiment",
1176
+ required: true,
1177
+ type: {
1178
+ name: "Enum",
1179
+ allowedValues: ["positive", "neutral", "negative"]
1180
+ }
1181
+ },
1182
+ confidenceScores: {
1183
+ serializedName: "confidenceScores",
1184
+ type: {
1185
+ name: "Composite",
1186
+ className: "SentimentConfidenceScores"
1187
+ }
1188
+ },
1189
+ offset: {
1190
+ serializedName: "offset",
1191
+ required: true,
1192
+ type: {
1193
+ name: "Number"
1194
+ }
1195
+ },
1196
+ length: {
1197
+ serializedName: "length",
1198
+ required: true,
1199
+ type: {
1200
+ name: "Number"
1201
+ }
1202
+ },
1203
+ targets: {
1204
+ serializedName: "targets",
1205
+ type: {
1206
+ name: "Sequence",
1207
+ element: {
1208
+ type: {
1209
+ name: "Composite",
1210
+ className: "SentenceTarget"
1211
+ }
1212
+ }
1213
+ }
1214
+ },
1215
+ assessments: {
1216
+ serializedName: "assessments",
1217
+ type: {
1218
+ name: "Sequence",
1219
+ element: {
1220
+ type: {
1221
+ name: "Composite",
1222
+ className: "AssessmentSentiment"
1223
+ }
1224
+ }
1225
+ }
1226
+ }
1227
+ }
1228
+ }
1229
+ };
1230
+ const SentenceTarget = {
1231
+ type: {
1232
+ name: "Composite",
1233
+ className: "SentenceTarget",
1234
+ modelProperties: {
1235
+ sentiment: {
1236
+ serializedName: "sentiment",
1237
+ required: true,
1238
+ type: {
1239
+ name: "Enum",
1240
+ allowedValues: ["positive", "mixed", "negative"]
1241
+ }
1242
+ },
1243
+ confidenceScores: {
1244
+ serializedName: "confidenceScores",
1245
+ type: {
1246
+ name: "Composite",
1247
+ className: "TargetConfidenceScores"
1248
+ }
1249
+ },
1250
+ offset: {
1251
+ serializedName: "offset",
1252
+ required: true,
1253
+ type: {
1254
+ name: "Number"
1255
+ }
1256
+ },
1257
+ length: {
1258
+ serializedName: "length",
1259
+ required: true,
1260
+ type: {
1261
+ name: "Number"
1262
+ }
1263
+ },
1264
+ text: {
1265
+ serializedName: "text",
1266
+ required: true,
1267
+ type: {
1268
+ name: "String"
1269
+ }
1270
+ },
1271
+ relations: {
1272
+ serializedName: "relations",
1273
+ required: true,
1274
+ type: {
1275
+ name: "Sequence",
1276
+ element: {
1277
+ type: {
1278
+ name: "Composite",
1279
+ className: "TargetRelation"
1280
+ }
1281
+ }
1282
+ }
1283
+ }
1284
+ }
1285
+ }
1286
+ };
1287
+ const TargetConfidenceScores = {
1288
+ type: {
1289
+ name: "Composite",
1290
+ className: "TargetConfidenceScores",
1291
+ modelProperties: {
1292
+ positive: {
1293
+ serializedName: "positive",
1294
+ required: true,
1295
+ type: {
1296
+ name: "Number"
1297
+ }
1298
+ },
1299
+ negative: {
1300
+ serializedName: "negative",
1301
+ required: true,
1302
+ type: {
1303
+ name: "Number"
1304
+ }
1305
+ }
1306
+ }
1307
+ }
1308
+ };
1309
+ const TargetRelation = {
1310
+ type: {
1311
+ name: "Composite",
1312
+ className: "TargetRelation",
1313
+ modelProperties: {
1314
+ relationType: {
1315
+ serializedName: "relationType",
1316
+ required: true,
1317
+ type: {
1318
+ name: "Enum",
1319
+ allowedValues: ["assessment", "target"]
1320
+ }
1321
+ },
1322
+ ref: {
1323
+ serializedName: "ref",
1324
+ required: true,
1325
+ type: {
1326
+ name: "String"
1327
+ }
1328
+ }
1329
+ }
1330
+ }
1331
+ };
1332
+ const AssessmentSentiment = {
1333
+ type: {
1334
+ name: "Composite",
1335
+ className: "AssessmentSentiment",
1336
+ modelProperties: {
1337
+ sentiment: {
1338
+ serializedName: "sentiment",
1339
+ required: true,
1340
+ type: {
1341
+ name: "Enum",
1342
+ allowedValues: ["positive", "mixed", "negative"]
1343
+ }
1344
+ },
1345
+ confidenceScores: {
1346
+ serializedName: "confidenceScores",
1347
+ type: {
1348
+ name: "Composite",
1349
+ className: "TargetConfidenceScores"
1350
+ }
1351
+ },
1352
+ offset: {
1353
+ serializedName: "offset",
1354
+ required: true,
1355
+ type: {
1356
+ name: "Number"
1357
+ }
1358
+ },
1359
+ length: {
1360
+ serializedName: "length",
1361
+ required: true,
1362
+ type: {
1363
+ name: "Number"
1364
+ }
1365
+ },
1366
+ text: {
1367
+ serializedName: "text",
1368
+ required: true,
1369
+ type: {
1370
+ name: "String"
1371
+ }
1372
+ },
1373
+ isNegated: {
1374
+ serializedName: "isNegated",
1375
+ required: true,
1376
+ type: {
1377
+ name: "Boolean"
1378
+ }
1379
+ }
1380
+ }
1381
+ }
1382
+ };
1383
+ const LinkedEntity = {
1384
+ type: {
1385
+ name: "Composite",
1386
+ className: "LinkedEntity",
1387
+ modelProperties: {
1388
+ name: {
1389
+ serializedName: "name",
1390
+ required: true,
1391
+ type: {
1392
+ name: "String"
1393
+ }
1394
+ },
1395
+ matches: {
1396
+ serializedName: "matches",
1397
+ required: true,
1398
+ type: {
1399
+ name: "Sequence",
1400
+ element: {
1401
+ type: {
1402
+ name: "Composite",
1403
+ className: "Match"
1404
+ }
1405
+ }
1406
+ }
1407
+ },
1408
+ language: {
1409
+ serializedName: "language",
1410
+ required: true,
1411
+ type: {
1412
+ name: "String"
1413
+ }
1414
+ },
1415
+ dataSourceEntityId: {
1416
+ serializedName: "id",
1417
+ type: {
1418
+ name: "String"
1419
+ }
1420
+ },
1421
+ url: {
1422
+ serializedName: "url",
1423
+ required: true,
1424
+ type: {
1425
+ name: "String"
1426
+ }
1427
+ },
1428
+ dataSource: {
1429
+ serializedName: "dataSource",
1430
+ required: true,
1431
+ type: {
1432
+ name: "String"
1433
+ }
1434
+ },
1435
+ bingEntitySearchApiId: {
1436
+ serializedName: "bingId",
1437
+ type: {
1438
+ name: "String"
1439
+ }
1440
+ }
1441
+ }
1442
+ }
1443
+ };
1444
+ const Match = {
1445
+ type: {
1446
+ name: "Composite",
1447
+ className: "Match",
1448
+ modelProperties: {
1449
+ confidenceScore: {
1450
+ serializedName: "confidenceScore",
1451
+ required: true,
1452
+ type: {
1453
+ name: "Number"
1454
+ }
1455
+ },
1456
+ text: {
1457
+ serializedName: "text",
1458
+ required: true,
1459
+ type: {
1460
+ name: "String"
1461
+ }
1462
+ },
1463
+ offset: {
1464
+ serializedName: "offset",
1465
+ required: true,
1466
+ type: {
1467
+ name: "Number"
1468
+ }
1469
+ },
1470
+ length: {
1471
+ serializedName: "length",
1472
+ required: true,
1473
+ type: {
1474
+ name: "Number"
1475
+ }
1476
+ }
1477
+ }
1478
+ }
1479
+ };
1480
+ const SummarySentence = {
1481
+ type: {
1482
+ name: "Composite",
1483
+ className: "SummarySentence",
1484
+ modelProperties: {
1485
+ text: {
1486
+ serializedName: "text",
1487
+ required: true,
1488
+ type: {
1489
+ name: "String"
1490
+ }
1491
+ },
1492
+ rankScore: {
1493
+ serializedName: "rankScore",
1494
+ required: true,
1495
+ type: {
1496
+ name: "Number"
1497
+ }
1498
+ },
1499
+ offset: {
1500
+ serializedName: "offset",
1501
+ required: true,
1502
+ type: {
1503
+ name: "Number"
1504
+ }
1505
+ },
1506
+ length: {
1507
+ serializedName: "length",
1508
+ required: true,
1509
+ type: {
1510
+ name: "Number"
1511
+ }
1512
+ }
1513
+ }
1514
+ }
1515
+ };
1516
+ const DetectedLanguage = {
1517
+ type: {
1518
+ name: "Composite",
1519
+ className: "DetectedLanguage",
1520
+ modelProperties: {
1521
+ name: {
1522
+ serializedName: "name",
1523
+ required: true,
1524
+ type: {
1525
+ name: "String"
1526
+ }
1527
+ },
1528
+ iso6391Name: {
1529
+ serializedName: "iso6391Name",
1530
+ required: true,
1531
+ type: {
1532
+ name: "String"
1533
+ }
1534
+ },
1535
+ confidenceScore: {
1536
+ serializedName: "confidenceScore",
1537
+ required: true,
1538
+ type: {
1539
+ name: "Number"
1540
+ }
1541
+ }
1542
+ }
1543
+ }
1544
+ };
1545
+ const Pagination = {
1546
+ type: {
1547
+ name: "Composite",
1548
+ className: "Pagination",
1549
+ modelProperties: {
1550
+ nextLink: {
1551
+ serializedName: "nextLink",
1552
+ type: {
1553
+ name: "String"
1554
+ }
1555
+ }
1556
+ }
1557
+ }
1558
+ };
1559
+ const JobMetadata = {
1560
+ type: {
1561
+ name: "Composite",
1562
+ className: "JobMetadata",
1563
+ modelProperties: {
1564
+ displayName: {
1565
+ serializedName: "displayName",
1566
+ type: {
1567
+ name: "String"
1568
+ }
1569
+ },
1570
+ createdDateTime: {
1571
+ serializedName: "createdDateTime",
1572
+ required: true,
1573
+ type: {
1574
+ name: "DateTime"
1575
+ }
1576
+ },
1577
+ expirationDateTime: {
1578
+ serializedName: "expirationDateTime",
1579
+ type: {
1580
+ name: "DateTime"
1581
+ }
1582
+ },
1583
+ jobId: {
1584
+ serializedName: "jobId",
1585
+ required: true,
1586
+ type: {
1587
+ name: "Uuid"
1588
+ }
1589
+ },
1590
+ lastUpdateDateTime: {
1591
+ serializedName: "lastUpdateDateTime",
1592
+ required: true,
1593
+ type: {
1594
+ name: "DateTime"
1595
+ }
1596
+ },
1597
+ status: {
1598
+ serializedName: "status",
1599
+ required: true,
1600
+ type: {
1601
+ name: "Enum",
1602
+ allowedValues: [
1603
+ "notStarted",
1604
+ "running",
1605
+ "succeeded",
1606
+ "partiallySucceeded",
1607
+ "failed",
1608
+ "cancelled",
1609
+ "cancelling"
1610
+ ]
1611
+ }
1612
+ }
1613
+ }
1614
+ }
1615
+ };
1616
+ const JobErrors = {
1617
+ type: {
1618
+ name: "Composite",
1619
+ className: "JobErrors",
1620
+ modelProperties: {
1621
+ errors: {
1622
+ serializedName: "errors",
1623
+ type: {
1624
+ name: "Sequence",
1625
+ element: {
1626
+ type: {
1627
+ name: "Composite",
1628
+ className: "ErrorModel"
1629
+ }
1630
+ }
1631
+ }
1632
+ }
1633
+ }
1634
+ }
1635
+ };
1636
+ const AnalyzeTextEntityLinkingInput = {
1637
+ serializedName: "EntityLinking",
1638
+ type: {
1639
+ name: "Composite",
1640
+ className: "AnalyzeTextEntityLinkingInput",
1641
+ uberParent: "AnalyzeAction",
1642
+ polymorphicDiscriminator: AnalyzeAction.type.polymorphicDiscriminator,
1643
+ modelProperties: Object.assign(Object.assign({}, AnalyzeAction.type.modelProperties), { analysisInput: {
1644
+ serializedName: "analysisInput",
1645
+ type: {
1646
+ name: "Composite",
1647
+ className: "MultiLanguageAnalysisInput"
1648
+ }
1649
+ }, parameters: {
1650
+ serializedName: "parameters",
1651
+ type: {
1652
+ name: "Composite",
1653
+ className: "EntityLinkingAction"
1654
+ }
1655
+ } })
1656
+ }
1657
+ };
1658
+ const AnalyzeTextEntityRecognitionInput = {
1659
+ serializedName: "EntityRecognition",
1660
+ type: {
1661
+ name: "Composite",
1662
+ className: "AnalyzeTextEntityRecognitionInput",
1663
+ uberParent: "AnalyzeAction",
1664
+ polymorphicDiscriminator: AnalyzeAction.type.polymorphicDiscriminator,
1665
+ modelProperties: Object.assign(Object.assign({}, AnalyzeAction.type.modelProperties), { analysisInput: {
1666
+ serializedName: "analysisInput",
1667
+ type: {
1668
+ name: "Composite",
1669
+ className: "MultiLanguageAnalysisInput"
1670
+ }
1671
+ }, parameters: {
1672
+ serializedName: "parameters",
1673
+ type: {
1674
+ name: "Composite",
1675
+ className: "EntityRecognitionAction"
1676
+ }
1677
+ } })
1678
+ }
1679
+ };
1680
+ const AnalyzeTextKeyPhraseExtractionInput = {
1681
+ serializedName: "KeyPhraseExtraction",
1682
+ type: {
1683
+ name: "Composite",
1684
+ className: "AnalyzeTextKeyPhraseExtractionInput",
1685
+ uberParent: "AnalyzeAction",
1686
+ polymorphicDiscriminator: AnalyzeAction.type.polymorphicDiscriminator,
1687
+ modelProperties: Object.assign(Object.assign({}, AnalyzeAction.type.modelProperties), { analysisInput: {
1688
+ serializedName: "analysisInput",
1689
+ type: {
1690
+ name: "Composite",
1691
+ className: "MultiLanguageAnalysisInput"
1692
+ }
1693
+ }, parameters: {
1694
+ serializedName: "parameters",
1695
+ type: {
1696
+ name: "Composite",
1697
+ className: "KeyPhraseExtractionAction"
1698
+ }
1699
+ } })
1700
+ }
1701
+ };
1702
+ const AnalyzeTextPiiEntitiesRecognitionInput = {
1703
+ serializedName: "PiiEntityRecognition",
1704
+ type: {
1705
+ name: "Composite",
1706
+ className: "AnalyzeTextPiiEntitiesRecognitionInput",
1707
+ uberParent: "AnalyzeAction",
1708
+ polymorphicDiscriminator: AnalyzeAction.type.polymorphicDiscriminator,
1709
+ modelProperties: Object.assign(Object.assign({}, AnalyzeAction.type.modelProperties), { analysisInput: {
1710
+ serializedName: "analysisInput",
1711
+ type: {
1712
+ name: "Composite",
1713
+ className: "MultiLanguageAnalysisInput"
1714
+ }
1715
+ }, parameters: {
1716
+ serializedName: "parameters",
1717
+ type: {
1718
+ name: "Composite",
1719
+ className: "PiiEntityRecognitionAction"
1720
+ }
1721
+ } })
1722
+ }
1723
+ };
1724
+ const AnalyzeTextLanguageDetectionInput = {
1725
+ serializedName: "LanguageDetection",
1726
+ type: {
1727
+ name: "Composite",
1728
+ className: "AnalyzeTextLanguageDetectionInput",
1729
+ uberParent: "AnalyzeAction",
1730
+ polymorphicDiscriminator: AnalyzeAction.type.polymorphicDiscriminator,
1731
+ modelProperties: Object.assign(Object.assign({}, AnalyzeAction.type.modelProperties), { analysisInput: {
1732
+ serializedName: "analysisInput",
1733
+ type: {
1734
+ name: "Composite",
1735
+ className: "LanguageDetectionAnalysisInput"
1736
+ }
1737
+ }, parameters: {
1738
+ serializedName: "parameters",
1739
+ type: {
1740
+ name: "Composite",
1741
+ className: "LanguageDetectionAction"
1742
+ }
1743
+ } })
1744
+ }
1745
+ };
1746
+ const AnalyzeTextSentimentAnalysisInput = {
1747
+ serializedName: "SentimentAnalysis",
1748
+ type: {
1749
+ name: "Composite",
1750
+ className: "AnalyzeTextSentimentAnalysisInput",
1751
+ uberParent: "AnalyzeAction",
1752
+ polymorphicDiscriminator: AnalyzeAction.type.polymorphicDiscriminator,
1753
+ modelProperties: Object.assign(Object.assign({}, AnalyzeAction.type.modelProperties), { analysisInput: {
1754
+ serializedName: "analysisInput",
1755
+ type: {
1756
+ name: "Composite",
1757
+ className: "MultiLanguageAnalysisInput"
1758
+ }
1759
+ }, parameters: {
1760
+ serializedName: "parameters",
1761
+ type: {
1762
+ name: "Composite",
1763
+ className: "SentimentAnalysisAction"
1764
+ }
1765
+ } })
1766
+ }
1767
+ };
1768
+ const SentimentTaskResult = {
1769
+ serializedName: "SentimentAnalysisResults",
1770
+ type: {
1771
+ name: "Composite",
1772
+ className: "SentimentTaskResult",
1773
+ uberParent: "AnalyzeTextTaskResult",
1774
+ polymorphicDiscriminator: AnalyzeTextTaskResult.type.polymorphicDiscriminator,
1775
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextTaskResult.type.modelProperties), { results: {
1776
+ serializedName: "results",
1777
+ type: {
1778
+ name: "Composite",
1779
+ className: "SentimentResponse"
1780
+ }
1781
+ } })
1782
+ }
1783
+ };
1784
+ const EntitiesTaskResult = {
1785
+ serializedName: "EntityRecognitionResults",
1786
+ type: {
1787
+ name: "Composite",
1788
+ className: "EntitiesTaskResult",
1789
+ uberParent: "AnalyzeTextTaskResult",
1790
+ polymorphicDiscriminator: AnalyzeTextTaskResult.type.polymorphicDiscriminator,
1791
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextTaskResult.type.modelProperties), { results: {
1792
+ serializedName: "results",
1793
+ type: {
1794
+ name: "Composite",
1795
+ className: "EntitiesResult"
1796
+ }
1797
+ } })
1798
+ }
1799
+ };
1800
+ const EntityLinkingTaskResult = {
1801
+ serializedName: "EntityLinkingResults",
1802
+ type: {
1803
+ name: "Composite",
1804
+ className: "EntityLinkingTaskResult",
1805
+ uberParent: "AnalyzeTextTaskResult",
1806
+ polymorphicDiscriminator: AnalyzeTextTaskResult.type.polymorphicDiscriminator,
1807
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextTaskResult.type.modelProperties), { results: {
1808
+ serializedName: "results",
1809
+ type: {
1810
+ name: "Composite",
1811
+ className: "EntityLinkingResult"
1812
+ }
1813
+ } })
1814
+ }
1815
+ };
1816
+ const PiiTaskResult = {
1817
+ serializedName: "PiiEntityRecognitionResults",
1818
+ type: {
1819
+ name: "Composite",
1820
+ className: "PiiTaskResult",
1821
+ uberParent: "AnalyzeTextTaskResult",
1822
+ polymorphicDiscriminator: AnalyzeTextTaskResult.type.polymorphicDiscriminator,
1823
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextTaskResult.type.modelProperties), { results: {
1824
+ serializedName: "results",
1825
+ type: {
1826
+ name: "Composite",
1827
+ className: "PiiResult"
1828
+ }
1829
+ } })
1830
+ }
1831
+ };
1832
+ const KeyPhraseTaskResult = {
1833
+ serializedName: "KeyPhraseExtractionResults",
1834
+ type: {
1835
+ name: "Composite",
1836
+ className: "KeyPhraseTaskResult",
1837
+ uberParent: "AnalyzeTextTaskResult",
1838
+ polymorphicDiscriminator: AnalyzeTextTaskResult.type.polymorphicDiscriminator,
1839
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextTaskResult.type.modelProperties), { results: {
1840
+ serializedName: "results",
1841
+ type: {
1842
+ name: "Composite",
1843
+ className: "KeyPhraseResult"
1844
+ }
1845
+ } })
1846
+ }
1847
+ };
1848
+ const LanguageDetectionTaskResult = {
1849
+ serializedName: "LanguageDetectionResults",
1850
+ type: {
1851
+ name: "Composite",
1852
+ className: "LanguageDetectionTaskResult",
1853
+ uberParent: "AnalyzeTextTaskResult",
1854
+ polymorphicDiscriminator: AnalyzeTextTaskResult.type.polymorphicDiscriminator,
1855
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextTaskResult.type.modelProperties), { results: {
1856
+ serializedName: "results",
1857
+ type: {
1858
+ name: "Composite",
1859
+ className: "LanguageDetectionResult"
1860
+ }
1861
+ } })
1862
+ }
1863
+ };
1864
+ const AnalyzeBatchAction = {
1865
+ serializedName: "AnalyzeBatchAction",
1866
+ type: {
1867
+ name: "Composite",
1868
+ className: "AnalyzeBatchAction",
1869
+ uberParent: "BatchActionState",
1870
+ polymorphicDiscriminator: {
1871
+ serializedName: "kind",
1872
+ clientName: "kind"
1873
+ },
1874
+ modelProperties: Object.assign(Object.assign({}, BatchActionState.type.modelProperties), { kind: {
1875
+ serializedName: "kind",
1876
+ required: true,
1877
+ type: {
1878
+ name: "String"
1879
+ }
1880
+ } })
1881
+ }
1882
+ };
1883
+ const AnalyzeTextLROResult = {
1884
+ serializedName: "AnalyzeTextLROResult",
1885
+ type: {
1886
+ name: "Composite",
1887
+ className: "AnalyzeTextLROResult",
1888
+ uberParent: "TaskState",
1889
+ polymorphicDiscriminator: {
1890
+ serializedName: "kind",
1891
+ clientName: "kind"
1892
+ },
1893
+ modelProperties: Object.assign(Object.assign(Object.assign({}, TaskState.type.modelProperties), BatchActionState.type.modelProperties), { kind: {
1894
+ serializedName: "kind",
1895
+ required: true,
1896
+ type: {
1897
+ name: "String"
1898
+ }
1899
+ } })
1900
+ }
1901
+ };
1902
+ const AnalyzeTextJobState = {
1903
+ type: {
1904
+ name: "Composite",
1905
+ className: "AnalyzeTextJobState",
1906
+ modelProperties: Object.assign(Object.assign(Object.assign({}, JobState.type.modelProperties), TasksState.type.modelProperties), AnalyzeTextJobStatistics.type.modelProperties)
1907
+ }
1908
+ };
1909
+ const ActionPrebuilt = {
1910
+ type: {
1911
+ name: "Composite",
1912
+ className: "ActionPrebuilt",
1913
+ modelProperties: Object.assign(Object.assign({}, ActionCommon.type.modelProperties), { modelVersion: {
1914
+ defaultValue: "latest",
1915
+ serializedName: "modelVersion",
1916
+ type: {
1917
+ name: "String"
1918
+ }
1919
+ } })
1920
+ }
1921
+ };
1922
+ const ActionCustom = {
1923
+ type: {
1924
+ name: "Composite",
1925
+ className: "ActionCustom",
1926
+ modelProperties: Object.assign(Object.assign({}, ActionCommon.type.modelProperties), { projectName: {
1927
+ serializedName: "projectName",
1928
+ required: true,
1929
+ type: {
1930
+ name: "String"
1931
+ }
1932
+ }, deploymentName: {
1933
+ serializedName: "deploymentName",
1934
+ required: true,
1935
+ type: {
1936
+ name: "String"
1937
+ }
1938
+ } })
1939
+ }
1940
+ };
1941
+ const HealthcareResult = {
1942
+ type: {
1943
+ name: "Composite",
1944
+ className: "HealthcareResult",
1945
+ modelProperties: Object.assign(Object.assign({}, PreBuiltResult.type.modelProperties), { documents: {
1946
+ serializedName: "documents",
1947
+ required: true,
1948
+ type: {
1949
+ name: "Sequence",
1950
+ element: {
1951
+ type: {
1952
+ name: "Composite",
1953
+ className: "HealthcareResultDocumentsItem"
1954
+ }
1955
+ }
1956
+ }
1957
+ } })
1958
+ }
1959
+ };
1960
+ const SentimentResponse = {
1961
+ type: {
1962
+ name: "Composite",
1963
+ className: "SentimentResponse",
1964
+ modelProperties: Object.assign(Object.assign({}, PreBuiltResult.type.modelProperties), { documents: {
1965
+ serializedName: "documents",
1966
+ required: true,
1967
+ type: {
1968
+ name: "Sequence",
1969
+ element: {
1970
+ type: {
1971
+ name: "Composite",
1972
+ className: "SentimentResponseDocumentsItem"
1973
+ }
1974
+ }
1975
+ }
1976
+ } })
1977
+ }
1978
+ };
1979
+ const EntitiesResult = {
1980
+ type: {
1981
+ name: "Composite",
1982
+ className: "EntitiesResult",
1983
+ modelProperties: Object.assign(Object.assign({}, PreBuiltResult.type.modelProperties), { documents: {
1984
+ serializedName: "documents",
1985
+ required: true,
1986
+ type: {
1987
+ name: "Sequence",
1988
+ element: {
1989
+ type: {
1990
+ name: "Composite",
1991
+ className: "EntitiesResultDocumentsItem"
1992
+ }
1993
+ }
1994
+ }
1995
+ } })
1996
+ }
1997
+ };
1998
+ const EntityLinkingResult = {
1999
+ type: {
2000
+ name: "Composite",
2001
+ className: "EntityLinkingResult",
2002
+ modelProperties: Object.assign(Object.assign({}, PreBuiltResult.type.modelProperties), { documents: {
2003
+ serializedName: "documents",
2004
+ required: true,
2005
+ type: {
2006
+ name: "Sequence",
2007
+ element: {
2008
+ type: {
2009
+ name: "Composite",
2010
+ className: "EntityLinkingResultDocumentsItem"
2011
+ }
2012
+ }
2013
+ }
2014
+ } })
2015
+ }
2016
+ };
2017
+ const PiiResult = {
2018
+ type: {
2019
+ name: "Composite",
2020
+ className: "PiiResult",
2021
+ modelProperties: Object.assign(Object.assign({}, PreBuiltResult.type.modelProperties), { documents: {
2022
+ serializedName: "documents",
2023
+ required: true,
2024
+ type: {
2025
+ name: "Sequence",
2026
+ element: {
2027
+ type: {
2028
+ name: "Composite",
2029
+ className: "PiiResultDocumentsItem"
2030
+ }
2031
+ }
2032
+ }
2033
+ } })
2034
+ }
2035
+ };
2036
+ const ExtractiveSummarizationResult = {
2037
+ type: {
2038
+ name: "Composite",
2039
+ className: "ExtractiveSummarizationResult",
2040
+ modelProperties: Object.assign(Object.assign({}, PreBuiltResult.type.modelProperties), { documents: {
2041
+ serializedName: "documents",
2042
+ required: true,
2043
+ type: {
2044
+ name: "Sequence",
2045
+ element: {
2046
+ type: {
2047
+ name: "Composite",
2048
+ className: "ExtractiveSummarizationResultDocumentsItem"
2049
+ }
2050
+ }
2051
+ }
2052
+ } })
2053
+ }
2054
+ };
2055
+ const KeyPhraseResult = {
2056
+ type: {
2057
+ name: "Composite",
2058
+ className: "KeyPhraseResult",
2059
+ modelProperties: Object.assign(Object.assign({}, PreBuiltResult.type.modelProperties), { documents: {
2060
+ serializedName: "documents",
2061
+ required: true,
2062
+ type: {
2063
+ name: "Sequence",
2064
+ element: {
2065
+ type: {
2066
+ name: "Composite",
2067
+ className: "KeyPhraseResultDocumentsItem"
2068
+ }
2069
+ }
2070
+ }
2071
+ } })
2072
+ }
2073
+ };
2074
+ const LanguageDetectionResult = {
2075
+ type: {
2076
+ name: "Composite",
2077
+ className: "LanguageDetectionResult",
2078
+ modelProperties: Object.assign(Object.assign({}, PreBuiltResult.type.modelProperties), { documents: {
2079
+ serializedName: "documents",
2080
+ required: true,
2081
+ type: {
2082
+ name: "Sequence",
2083
+ element: {
2084
+ type: {
2085
+ name: "Composite",
2086
+ className: "LanguageDetectionDocumentResult"
2087
+ }
2088
+ }
2089
+ }
2090
+ } })
2091
+ }
2092
+ };
2093
+ const CustomEntitiesResult = {
2094
+ type: {
2095
+ name: "Composite",
2096
+ className: "CustomEntitiesResult",
2097
+ modelProperties: Object.assign(Object.assign({}, CustomResult.type.modelProperties), { documents: {
2098
+ serializedName: "documents",
2099
+ required: true,
2100
+ type: {
2101
+ name: "Sequence",
2102
+ element: {
2103
+ type: {
2104
+ name: "Composite",
2105
+ className: "CustomEntitiesResultDocumentsItem"
2106
+ }
2107
+ }
2108
+ }
2109
+ } })
2110
+ }
2111
+ };
2112
+ const CustomSingleLabelClassificationResult = {
2113
+ type: {
2114
+ name: "Composite",
2115
+ className: "CustomSingleLabelClassificationResult",
2116
+ modelProperties: Object.assign(Object.assign({}, CustomResult.type.modelProperties), { documents: {
2117
+ serializedName: "documents",
2118
+ required: true,
2119
+ type: {
2120
+ name: "Sequence",
2121
+ element: {
2122
+ type: {
2123
+ name: "Composite",
2124
+ className: "CustomSingleLabelClassificationResultDocumentsItem"
2125
+ }
2126
+ }
2127
+ }
2128
+ } })
2129
+ }
2130
+ };
2131
+ const CustomMultiLabelClassificationResult = {
2132
+ type: {
2133
+ name: "Composite",
2134
+ className: "CustomMultiLabelClassificationResult",
2135
+ modelProperties: Object.assign(Object.assign({}, CustomResult.type.modelProperties), { documents: {
2136
+ serializedName: "documents",
2137
+ required: true,
2138
+ type: {
2139
+ name: "Sequence",
2140
+ element: {
2141
+ type: {
2142
+ name: "Composite",
2143
+ className: "CustomMultiLabelClassificationResultDocumentsItem"
2144
+ }
2145
+ }
2146
+ }
2147
+ } })
2148
+ }
2149
+ };
2150
+ const EntitiesDocumentResult = {
2151
+ type: {
2152
+ name: "Composite",
2153
+ className: "EntitiesDocumentResult",
2154
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { entities: {
2155
+ serializedName: "entities",
2156
+ required: true,
2157
+ type: {
2158
+ name: "Sequence",
2159
+ element: {
2160
+ type: {
2161
+ name: "Composite",
2162
+ className: "Entity"
2163
+ }
2164
+ }
2165
+ }
2166
+ } })
2167
+ }
2168
+ };
2169
+ const SingleClassificationDocumentResult = {
2170
+ type: {
2171
+ name: "Composite",
2172
+ className: "SingleClassificationDocumentResult",
2173
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { classification: {
2174
+ serializedName: "class",
2175
+ type: {
2176
+ name: "Composite",
2177
+ className: "ClassificationCategory"
2178
+ }
2179
+ } })
2180
+ }
2181
+ };
2182
+ const MultiClassificationDocumentResult = {
2183
+ type: {
2184
+ name: "Composite",
2185
+ className: "MultiClassificationDocumentResult",
2186
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { classifications: {
2187
+ serializedName: "class",
2188
+ required: true,
2189
+ type: {
2190
+ name: "Sequence",
2191
+ element: {
2192
+ type: {
2193
+ name: "Composite",
2194
+ className: "ClassificationCategory"
2195
+ }
2196
+ }
2197
+ }
2198
+ } })
2199
+ }
2200
+ };
2201
+ const HealthcareEntitiesDocumentResult = {
2202
+ type: {
2203
+ name: "Composite",
2204
+ className: "HealthcareEntitiesDocumentResult",
2205
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { entities: {
2206
+ serializedName: "entities",
2207
+ required: true,
2208
+ type: {
2209
+ name: "Sequence",
2210
+ element: {
2211
+ type: {
2212
+ name: "Composite",
2213
+ className: "HealthcareEntity"
2214
+ }
2215
+ }
2216
+ }
2217
+ }, relations: {
2218
+ serializedName: "relations",
2219
+ required: true,
2220
+ type: {
2221
+ name: "Sequence",
2222
+ element: {
2223
+ type: {
2224
+ name: "Composite",
2225
+ className: "HealthcareRelation"
2226
+ }
2227
+ }
2228
+ }
2229
+ }, fhirBundle: {
2230
+ serializedName: "fhirBundle",
2231
+ type: {
2232
+ name: "Dictionary",
2233
+ value: { type: { name: "any" } }
2234
+ }
2235
+ } })
2236
+ }
2237
+ };
2238
+ const SentimentDocumentResult = {
2239
+ type: {
2240
+ name: "Composite",
2241
+ className: "SentimentDocumentResult",
2242
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { sentiment: {
2243
+ serializedName: "sentiment",
2244
+ required: true,
2245
+ type: {
2246
+ name: "Enum",
2247
+ allowedValues: ["positive", "neutral", "negative", "mixed"]
2248
+ }
2249
+ }, confidenceScores: {
2250
+ serializedName: "confidenceScores",
2251
+ type: {
2252
+ name: "Composite",
2253
+ className: "SentimentConfidenceScores"
2254
+ }
2255
+ }, sentences: {
2256
+ serializedName: "sentences",
2257
+ required: true,
2258
+ type: {
2259
+ name: "Sequence",
2260
+ element: {
2261
+ type: {
2262
+ name: "Composite",
2263
+ className: "SentenceSentiment"
2264
+ }
2265
+ }
2266
+ }
2267
+ } })
2268
+ }
2269
+ };
2270
+ const LinkedEntitiesDocumentResult = {
2271
+ type: {
2272
+ name: "Composite",
2273
+ className: "LinkedEntitiesDocumentResult",
2274
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { entities: {
2275
+ serializedName: "entities",
2276
+ required: true,
2277
+ type: {
2278
+ name: "Sequence",
2279
+ element: {
2280
+ type: {
2281
+ name: "Composite",
2282
+ className: "LinkedEntity"
2283
+ }
2284
+ }
2285
+ }
2286
+ } })
2287
+ }
2288
+ };
2289
+ const PiiEntitiesDocumentResult = {
2290
+ type: {
2291
+ name: "Composite",
2292
+ className: "PiiEntitiesDocumentResult",
2293
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { redactedText: {
2294
+ serializedName: "redactedText",
2295
+ required: true,
2296
+ type: {
2297
+ name: "String"
2298
+ }
2299
+ }, entities: {
2300
+ serializedName: "entities",
2301
+ required: true,
2302
+ type: {
2303
+ name: "Sequence",
2304
+ element: {
2305
+ type: {
2306
+ name: "Composite",
2307
+ className: "Entity"
2308
+ }
2309
+ }
2310
+ }
2311
+ } })
2312
+ }
2313
+ };
2314
+ const ExtractedSummaryDocumentResult = {
2315
+ type: {
2316
+ name: "Composite",
2317
+ className: "ExtractedSummaryDocumentResult",
2318
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { sentences: {
2319
+ serializedName: "sentences",
2320
+ required: true,
2321
+ type: {
2322
+ name: "Sequence",
2323
+ element: {
2324
+ type: {
2325
+ name: "Composite",
2326
+ className: "SummarySentence"
2327
+ }
2328
+ }
2329
+ }
2330
+ } })
2331
+ }
2332
+ };
2333
+ const KeyPhrasesDocumentResult = {
2334
+ type: {
2335
+ name: "Composite",
2336
+ className: "KeyPhrasesDocumentResult",
2337
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { keyPhrases: {
2338
+ serializedName: "keyPhrases",
2339
+ required: true,
2340
+ type: {
2341
+ name: "Sequence",
2342
+ element: {
2343
+ type: {
2344
+ name: "String"
2345
+ }
2346
+ }
2347
+ }
2348
+ } })
2349
+ }
2350
+ };
2351
+ const LanguageDetectionDocumentResult = {
2352
+ type: {
2353
+ name: "Composite",
2354
+ className: "LanguageDetectionDocumentResult",
2355
+ modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { detectedLanguage: {
2356
+ serializedName: "detectedLanguage",
2357
+ type: {
2358
+ name: "Composite",
2359
+ className: "DetectedLanguage"
2360
+ }
2361
+ } })
2362
+ }
2363
+ };
2364
+ const CustomEntitiesLROTask = {
2365
+ serializedName: "CustomEntityRecognition",
2366
+ type: {
2367
+ name: "Composite",
2368
+ className: "CustomEntitiesLROTask",
2369
+ uberParent: "BatchActionState",
2370
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2371
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2372
+ serializedName: "parameters",
2373
+ type: {
2374
+ name: "Composite",
2375
+ className: "CustomEntityRecognitionAction"
2376
+ }
2377
+ } })
2378
+ }
2379
+ };
2380
+ const CustomSingleLabelClassificationLROTask = {
2381
+ serializedName: "CustomSingleLabelClassification",
2382
+ type: {
2383
+ name: "Composite",
2384
+ className: "CustomSingleLabelClassificationLROTask",
2385
+ uberParent: "BatchActionState",
2386
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2387
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2388
+ serializedName: "parameters",
2389
+ type: {
2390
+ name: "Composite",
2391
+ className: "CustomSingleLabelClassificationAction"
2392
+ }
2393
+ } })
2394
+ }
2395
+ };
2396
+ const CustomMultiLabelClassificationLROTask = {
2397
+ serializedName: "CustomMultiLabelClassification",
2398
+ type: {
2399
+ name: "Composite",
2400
+ className: "CustomMultiLabelClassificationLROTask",
2401
+ uberParent: "BatchActionState",
2402
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2403
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2404
+ serializedName: "parameters",
2405
+ type: {
2406
+ name: "Composite",
2407
+ className: "CustomMultiLabelClassificationAction"
2408
+ }
2409
+ } })
2410
+ }
2411
+ };
2412
+ const HealthcareLROTask = {
2413
+ serializedName: "Healthcare",
2414
+ type: {
2415
+ name: "Composite",
2416
+ className: "HealthcareLROTask",
2417
+ uberParent: "BatchActionState",
2418
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2419
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2420
+ serializedName: "parameters",
2421
+ type: {
2422
+ name: "Composite",
2423
+ className: "HealthcareAction"
2424
+ }
2425
+ } })
2426
+ }
2427
+ };
2428
+ const SentimentAnalysisLROTask = {
2429
+ serializedName: "SentimentAnalysis",
2430
+ type: {
2431
+ name: "Composite",
2432
+ className: "SentimentAnalysisLROTask",
2433
+ uberParent: "BatchActionState",
2434
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2435
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2436
+ serializedName: "parameters",
2437
+ type: {
2438
+ name: "Composite",
2439
+ className: "SentimentAnalysisAction"
2440
+ }
2441
+ } })
2442
+ }
2443
+ };
2444
+ const EntitiesLROTask = {
2445
+ serializedName: "EntityRecognition",
2446
+ type: {
2447
+ name: "Composite",
2448
+ className: "EntitiesLROTask",
2449
+ uberParent: "BatchActionState",
2450
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2451
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2452
+ serializedName: "parameters",
2453
+ type: {
2454
+ name: "Composite",
2455
+ className: "EntityRecognitionAction"
2456
+ }
2457
+ } })
2458
+ }
2459
+ };
2460
+ const EntityLinkingLROTask = {
2461
+ serializedName: "EntityLinking",
2462
+ type: {
2463
+ name: "Composite",
2464
+ className: "EntityLinkingLROTask",
2465
+ uberParent: "BatchActionState",
2466
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2467
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2468
+ serializedName: "parameters",
2469
+ type: {
2470
+ name: "Composite",
2471
+ className: "EntityLinkingAction"
2472
+ }
2473
+ } })
2474
+ }
2475
+ };
2476
+ const PiiLROTask = {
2477
+ serializedName: "PiiEntityRecognition",
2478
+ type: {
2479
+ name: "Composite",
2480
+ className: "PiiLROTask",
2481
+ uberParent: "BatchActionState",
2482
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2483
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2484
+ serializedName: "parameters",
2485
+ type: {
2486
+ name: "Composite",
2487
+ className: "PiiEntityRecognitionAction"
2488
+ }
2489
+ } })
2490
+ }
2491
+ };
2492
+ const ExtractiveSummarizationLROTask = {
2493
+ serializedName: "ExtractiveSummarization",
2494
+ type: {
2495
+ name: "Composite",
2496
+ className: "ExtractiveSummarizationLROTask",
2497
+ uberParent: "BatchActionState",
2498
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2499
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2500
+ serializedName: "parameters",
2501
+ type: {
2502
+ name: "Composite",
2503
+ className: "ExtractiveSummarizationAction"
2504
+ }
2505
+ } })
2506
+ }
2507
+ };
2508
+ const KeyPhraseLROTask = {
2509
+ serializedName: "KeyPhraseExtraction",
2510
+ type: {
2511
+ name: "Composite",
2512
+ className: "KeyPhraseLROTask",
2513
+ uberParent: "BatchActionState",
2514
+ polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
2515
+ modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
2516
+ serializedName: "parameters",
2517
+ type: {
2518
+ name: "Composite",
2519
+ className: "KeyPhraseExtractionAction"
2520
+ }
2521
+ } })
2522
+ }
2523
+ };
2524
+ const EntityRecognitionLROResult = {
2525
+ serializedName: "EntityRecognitionLROResults",
2526
+ type: {
2527
+ name: "Composite",
2528
+ className: "EntityRecognitionLROResult",
2529
+ uberParent: "TaskState",
2530
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2531
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2532
+ serializedName: "results",
2533
+ type: {
2534
+ name: "Composite",
2535
+ className: "EntitiesResult"
2536
+ }
2537
+ } })
2538
+ }
2539
+ };
2540
+ const CustomEntityRecognitionLROResult = {
2541
+ serializedName: "CustomEntityRecognitionLROResults",
2542
+ type: {
2543
+ name: "Composite",
2544
+ className: "CustomEntityRecognitionLROResult",
2545
+ uberParent: "TaskState",
2546
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2547
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2548
+ serializedName: "results",
2549
+ type: {
2550
+ name: "Composite",
2551
+ className: "CustomEntitiesResult"
2552
+ }
2553
+ } })
2554
+ }
2555
+ };
2556
+ const CustomSingleLabelClassificationLROResult = {
2557
+ serializedName: "CustomSingleLabelClassificationLROResults",
2558
+ type: {
2559
+ name: "Composite",
2560
+ className: "CustomSingleLabelClassificationLROResult",
2561
+ uberParent: "TaskState",
2562
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2563
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2564
+ serializedName: "results",
2565
+ type: {
2566
+ name: "Composite",
2567
+ className: "CustomSingleLabelClassificationResult"
2568
+ }
2569
+ } })
2570
+ }
2571
+ };
2572
+ const CustomMultiLabelClassificationLROResult = {
2573
+ serializedName: "CustomMultiLabelClassificationLROResults",
2574
+ type: {
2575
+ name: "Composite",
2576
+ className: "CustomMultiLabelClassificationLROResult",
2577
+ uberParent: "TaskState",
2578
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2579
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2580
+ serializedName: "results",
2581
+ type: {
2582
+ name: "Composite",
2583
+ className: "CustomMultiLabelClassificationResult"
2584
+ }
2585
+ } })
2586
+ }
2587
+ };
2588
+ const EntityLinkingLROResult = {
2589
+ serializedName: "EntityLinkingLROResults",
2590
+ type: {
2591
+ name: "Composite",
2592
+ className: "EntityLinkingLROResult",
2593
+ uberParent: "TaskState",
2594
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2595
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2596
+ serializedName: "results",
2597
+ type: {
2598
+ name: "Composite",
2599
+ className: "EntityLinkingResult"
2600
+ }
2601
+ } })
2602
+ }
2603
+ };
2604
+ const PiiEntityRecognitionLROResult = {
2605
+ serializedName: "PiiEntityRecognitionLROResults",
2606
+ type: {
2607
+ name: "Composite",
2608
+ className: "PiiEntityRecognitionLROResult",
2609
+ uberParent: "TaskState",
2610
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2611
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2612
+ serializedName: "results",
2613
+ type: {
2614
+ name: "Composite",
2615
+ className: "PiiResult"
2616
+ }
2617
+ } })
2618
+ }
2619
+ };
2620
+ const ExtractiveSummarizationLROResult = {
2621
+ serializedName: "ExtractiveSummarizationLROResults",
2622
+ type: {
2623
+ name: "Composite",
2624
+ className: "ExtractiveSummarizationLROResult",
2625
+ uberParent: "TaskState",
2626
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2627
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2628
+ serializedName: "results",
2629
+ type: {
2630
+ name: "Composite",
2631
+ className: "ExtractiveSummarizationResult"
2632
+ }
2633
+ } })
2634
+ }
2635
+ };
2636
+ const HealthcareLROResult = {
2637
+ serializedName: "HealthcareLROResults",
2638
+ type: {
2639
+ name: "Composite",
2640
+ className: "HealthcareLROResult",
2641
+ uberParent: "TaskState",
2642
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2643
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2644
+ serializedName: "results",
2645
+ type: {
2646
+ name: "Composite",
2647
+ className: "HealthcareResult"
2648
+ }
2649
+ } })
2650
+ }
2651
+ };
2652
+ const SentimentLROResult = {
2653
+ serializedName: "SentimentAnalysisLROResults",
2654
+ type: {
2655
+ name: "Composite",
2656
+ className: "SentimentLROResult",
2657
+ uberParent: "TaskState",
2658
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2659
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2660
+ serializedName: "results",
2661
+ type: {
2662
+ name: "Composite",
2663
+ className: "SentimentResponse"
2664
+ }
2665
+ } })
2666
+ }
2667
+ };
2668
+ const KeyPhraseExtractionLROResult = {
2669
+ serializedName: "KeyPhraseExtractionLROResults",
2670
+ type: {
2671
+ name: "Composite",
2672
+ className: "KeyPhraseExtractionLROResult",
2673
+ uberParent: "TaskState",
2674
+ polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
2675
+ modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
2676
+ serializedName: "results",
2677
+ type: {
2678
+ name: "Composite",
2679
+ className: "KeyPhraseResult"
2680
+ }
2681
+ } })
2682
+ }
2683
+ };
2684
+ const EntityLinkingAction = {
2685
+ type: {
2686
+ name: "Composite",
2687
+ className: "EntityLinkingAction",
2688
+ modelProperties: Object.assign(Object.assign({}, ActionPrebuilt.type.modelProperties), { stringIndexType: {
2689
+ defaultValue: "Utf16CodeUnit",
2690
+ serializedName: "stringIndexType",
2691
+ type: {
2692
+ name: "String"
2693
+ }
2694
+ } })
2695
+ }
2696
+ };
2697
+ const EntityRecognitionAction = {
2698
+ type: {
2699
+ name: "Composite",
2700
+ className: "EntityRecognitionAction",
2701
+ modelProperties: Object.assign(Object.assign({}, ActionPrebuilt.type.modelProperties), { stringIndexType: {
2702
+ defaultValue: "Utf16CodeUnit",
2703
+ serializedName: "stringIndexType",
2704
+ type: {
2705
+ name: "String"
2706
+ }
2707
+ } })
2708
+ }
2709
+ };
2710
+ const KeyPhraseExtractionAction = {
2711
+ type: {
2712
+ name: "Composite",
2713
+ className: "KeyPhraseExtractionAction",
2714
+ modelProperties: Object.assign({}, ActionPrebuilt.type.modelProperties)
2715
+ }
2716
+ };
2717
+ const PiiEntityRecognitionAction = {
2718
+ type: {
2719
+ name: "Composite",
2720
+ className: "PiiEntityRecognitionAction",
2721
+ modelProperties: Object.assign(Object.assign({}, ActionPrebuilt.type.modelProperties), { domainFilter: {
2722
+ defaultValue: "none",
2723
+ serializedName: "domain",
2724
+ type: {
2725
+ name: "String"
2726
+ }
2727
+ }, categoriesFilter: {
2728
+ constraints: {
2729
+ UniqueItems: true
2730
+ },
2731
+ serializedName: "piiCategories",
2732
+ type: {
2733
+ name: "Sequence",
2734
+ element: {
2735
+ type: {
2736
+ name: "String"
2737
+ }
2738
+ }
2739
+ }
2740
+ }, stringIndexType: {
2741
+ defaultValue: "Utf16CodeUnit",
2742
+ serializedName: "stringIndexType",
2743
+ type: {
2744
+ name: "String"
2745
+ }
2746
+ } })
2747
+ }
2748
+ };
2749
+ const LanguageDetectionAction = {
2750
+ type: {
2751
+ name: "Composite",
2752
+ className: "LanguageDetectionAction",
2753
+ modelProperties: Object.assign({}, ActionPrebuilt.type.modelProperties)
2754
+ }
2755
+ };
2756
+ const SentimentAnalysisAction = {
2757
+ type: {
2758
+ name: "Composite",
2759
+ className: "SentimentAnalysisAction",
2760
+ modelProperties: Object.assign(Object.assign({}, ActionPrebuilt.type.modelProperties), { includeOpinionMining: {
2761
+ defaultValue: false,
2762
+ serializedName: "opinionMining",
2763
+ type: {
2764
+ name: "Boolean"
2765
+ }
2766
+ }, stringIndexType: {
2767
+ defaultValue: "Utf16CodeUnit",
2768
+ serializedName: "stringIndexType",
2769
+ type: {
2770
+ name: "String"
2771
+ }
2772
+ } })
2773
+ }
2774
+ };
2775
+ const HealthcareAction = {
2776
+ type: {
2777
+ name: "Composite",
2778
+ className: "HealthcareAction",
2779
+ modelProperties: Object.assign(Object.assign({}, ActionPrebuilt.type.modelProperties), { fhirVersion: {
2780
+ serializedName: "fhirVersion",
2781
+ type: {
2782
+ name: "String"
2783
+ }
2784
+ }, stringIndexType: {
2785
+ defaultValue: "Utf16CodeUnit",
2786
+ serializedName: "stringIndexType",
2787
+ type: {
2788
+ name: "String"
2789
+ }
2790
+ } })
2791
+ }
2792
+ };
2793
+ const ExtractiveSummarizationAction = {
2794
+ type: {
2795
+ name: "Composite",
2796
+ className: "ExtractiveSummarizationAction",
2797
+ modelProperties: Object.assign(Object.assign({}, ActionPrebuilt.type.modelProperties), { maxSentenceCount: {
2798
+ defaultValue: 3,
2799
+ serializedName: "sentenceCount",
2800
+ type: {
2801
+ name: "Number"
2802
+ }
2803
+ }, orderBy: {
2804
+ defaultValue: "Offset",
2805
+ serializedName: "sortBy",
2806
+ type: {
2807
+ name: "String"
2808
+ }
2809
+ }, stringIndexType: {
2810
+ defaultValue: "Utf16CodeUnit",
2811
+ serializedName: "stringIndexType",
2812
+ type: {
2813
+ name: "String"
2814
+ }
2815
+ } })
2816
+ }
2817
+ };
2818
+ const CustomEntityRecognitionAction = {
2819
+ type: {
2820
+ name: "Composite",
2821
+ className: "CustomEntityRecognitionAction",
2822
+ modelProperties: Object.assign(Object.assign({}, ActionCustom.type.modelProperties), { stringIndexType: {
2823
+ defaultValue: "Utf16CodeUnit",
2824
+ serializedName: "stringIndexType",
2825
+ type: {
2826
+ name: "String"
2827
+ }
2828
+ } })
2829
+ }
2830
+ };
2831
+ const CustomSingleLabelClassificationAction = {
2832
+ type: {
2833
+ name: "Composite",
2834
+ className: "CustomSingleLabelClassificationAction",
2835
+ modelProperties: Object.assign({}, ActionCustom.type.modelProperties)
2836
+ }
2837
+ };
2838
+ const CustomMultiLabelClassificationAction = {
2839
+ type: {
2840
+ name: "Composite",
2841
+ className: "CustomMultiLabelClassificationAction",
2842
+ modelProperties: Object.assign({}, ActionCustom.type.modelProperties)
2843
+ }
2844
+ };
2845
+ const CustomEntitiesResultDocumentsItem = {
2846
+ type: {
2847
+ name: "Composite",
2848
+ className: "CustomEntitiesResultDocumentsItem",
2849
+ modelProperties: Object.assign({}, EntitiesDocumentResult.type.modelProperties)
2850
+ }
2851
+ };
2852
+ const EntitiesResultDocumentsItem = {
2853
+ type: {
2854
+ name: "Composite",
2855
+ className: "EntitiesResultDocumentsItem",
2856
+ modelProperties: Object.assign({}, EntitiesDocumentResult.type.modelProperties)
2857
+ }
2858
+ };
2859
+ const CustomSingleLabelClassificationResultDocumentsItem = {
2860
+ type: {
2861
+ name: "Composite",
2862
+ className: "CustomSingleLabelClassificationResultDocumentsItem",
2863
+ modelProperties: Object.assign({}, SingleClassificationDocumentResult.type.modelProperties)
2864
+ }
2865
+ };
2866
+ const CustomMultiLabelClassificationResultDocumentsItem = {
2867
+ type: {
2868
+ name: "Composite",
2869
+ className: "CustomMultiLabelClassificationResultDocumentsItem",
2870
+ modelProperties: Object.assign({}, MultiClassificationDocumentResult.type.modelProperties)
2871
+ }
2872
+ };
2873
+ const HealthcareResultDocumentsItem = {
2874
+ type: {
2875
+ name: "Composite",
2876
+ className: "HealthcareResultDocumentsItem",
2877
+ modelProperties: Object.assign({}, HealthcareEntitiesDocumentResult.type.modelProperties)
2878
+ }
2879
+ };
2880
+ const SentimentResponseDocumentsItem = {
2881
+ type: {
2882
+ name: "Composite",
2883
+ className: "SentimentResponseDocumentsItem",
2884
+ modelProperties: Object.assign({}, SentimentDocumentResult.type.modelProperties)
2885
+ }
2886
+ };
2887
+ const EntityLinkingResultDocumentsItem = {
2888
+ type: {
2889
+ name: "Composite",
2890
+ className: "EntityLinkingResultDocumentsItem",
2891
+ modelProperties: Object.assign({}, LinkedEntitiesDocumentResult.type.modelProperties)
2892
+ }
2893
+ };
2894
+ const PiiResultDocumentsItem = {
2895
+ type: {
2896
+ name: "Composite",
2897
+ className: "PiiResultDocumentsItem",
2898
+ modelProperties: Object.assign({}, PiiEntitiesDocumentResult.type.modelProperties)
2899
+ }
2900
+ };
2901
+ const ExtractiveSummarizationResultDocumentsItem = {
2902
+ type: {
2903
+ name: "Composite",
2904
+ className: "ExtractiveSummarizationResultDocumentsItem",
2905
+ modelProperties: Object.assign({}, ExtractedSummaryDocumentResult.type.modelProperties)
2906
+ }
2907
+ };
2908
+ const KeyPhraseResultDocumentsItem = {
2909
+ type: {
2910
+ name: "Composite",
2911
+ className: "KeyPhraseResultDocumentsItem",
2912
+ modelProperties: Object.assign({}, KeyPhrasesDocumentResult.type.modelProperties)
2913
+ }
2914
+ };
2915
+ const AnalyzeTextSubmitJobHeaders = {
2916
+ type: {
2917
+ name: "Composite",
2918
+ className: "AnalyzeTextSubmitJobHeaders",
2919
+ modelProperties: {
2920
+ operationLocation: {
2921
+ serializedName: "operation-location",
2922
+ type: {
2923
+ name: "String"
2924
+ }
2925
+ }
2926
+ }
2927
+ }
2928
+ };
2929
+ const AnalyzeTextCancelJobHeaders = {
2930
+ type: {
2931
+ name: "Composite",
2932
+ className: "AnalyzeTextCancelJobHeaders",
2933
+ modelProperties: {
2934
+ operationLocation: {
2935
+ serializedName: "operation-location",
2936
+ type: {
2937
+ name: "String"
2938
+ }
2939
+ }
2940
+ }
2941
+ }
2942
+ };
2943
+ let discriminators = {
2944
+ AnalyzeAction: AnalyzeAction,
2945
+ AnalyzeTextTaskResult: AnalyzeTextTaskResult,
2946
+ "AnalyzeAction.EntityLinking": AnalyzeTextEntityLinkingInput,
2947
+ "AnalyzeAction.EntityRecognition": AnalyzeTextEntityRecognitionInput,
2948
+ "AnalyzeAction.KeyPhraseExtraction": AnalyzeTextKeyPhraseExtractionInput,
2949
+ "AnalyzeAction.PiiEntityRecognition": AnalyzeTextPiiEntitiesRecognitionInput,
2950
+ "AnalyzeAction.LanguageDetection": AnalyzeTextLanguageDetectionInput,
2951
+ "AnalyzeAction.SentimentAnalysis": AnalyzeTextSentimentAnalysisInput,
2952
+ "AnalyzeTextTaskResult.SentimentAnalysisResults": SentimentTaskResult,
2953
+ "AnalyzeTextTaskResult.EntityRecognitionResults": EntitiesTaskResult,
2954
+ "AnalyzeTextTaskResult.EntityLinkingResults": EntityLinkingTaskResult,
2955
+ "AnalyzeTextTaskResult.PiiEntityRecognitionResults": PiiTaskResult,
2956
+ "AnalyzeTextTaskResult.KeyPhraseExtractionResults": KeyPhraseTaskResult,
2957
+ "AnalyzeTextTaskResult.LanguageDetectionResults": LanguageDetectionTaskResult,
2958
+ "BatchActionState.AnalyzeBatchAction": AnalyzeBatchAction,
2959
+ "TaskState.AnalyzeTextLROResult": AnalyzeTextLROResult,
2960
+ "BatchActionState.CustomEntityRecognition": CustomEntitiesLROTask,
2961
+ "BatchActionState.CustomSingleLabelClassification": CustomSingleLabelClassificationLROTask,
2962
+ "BatchActionState.CustomMultiLabelClassification": CustomMultiLabelClassificationLROTask,
2963
+ "BatchActionState.Healthcare": HealthcareLROTask,
2964
+ "BatchActionState.SentimentAnalysis": SentimentAnalysisLROTask,
2965
+ "BatchActionState.EntityRecognition": EntitiesLROTask,
2966
+ "BatchActionState.EntityLinking": EntityLinkingLROTask,
2967
+ "BatchActionState.PiiEntityRecognition": PiiLROTask,
2968
+ "BatchActionState.ExtractiveSummarization": ExtractiveSummarizationLROTask,
2969
+ "BatchActionState.KeyPhraseExtraction": KeyPhraseLROTask,
2970
+ "TaskState.EntityRecognitionLROResults": EntityRecognitionLROResult,
2971
+ "TaskState.CustomEntityRecognitionLROResults": CustomEntityRecognitionLROResult,
2972
+ "TaskState.CustomSingleLabelClassificationLROResults": CustomSingleLabelClassificationLROResult,
2973
+ "TaskState.CustomMultiLabelClassificationLROResults": CustomMultiLabelClassificationLROResult,
2974
+ "TaskState.EntityLinkingLROResults": EntityLinkingLROResult,
2975
+ "TaskState.PiiEntityRecognitionLROResults": PiiEntityRecognitionLROResult,
2976
+ "TaskState.ExtractiveSummarizationLROResults": ExtractiveSummarizationLROResult,
2977
+ "TaskState.HealthcareLROResults": HealthcareLROResult,
2978
+ "TaskState.SentimentAnalysisLROResults": SentimentLROResult,
2979
+ "TaskState.KeyPhraseExtractionLROResults": KeyPhraseExtractionLROResult
2980
+ };
2981
+
2982
+ var Mappers = /*#__PURE__*/Object.freeze({
2983
+ __proto__: null,
2984
+ AnalyzeAction: AnalyzeAction,
2985
+ AnalyzeTextTaskResult: AnalyzeTextTaskResult,
2986
+ ErrorResponse: ErrorResponse,
2987
+ ErrorModel: ErrorModel,
2988
+ InnerErrorModel: InnerErrorModel,
2989
+ AnalyzeTextJobsInput: AnalyzeTextJobsInput,
2990
+ MultiLanguageAnalysisInput: MultiLanguageAnalysisInput,
2991
+ TextDocumentInput: TextDocumentInput,
2992
+ BatchActionState: BatchActionState,
2993
+ JobState: JobState,
2994
+ TasksState: TasksState,
2995
+ TasksStateTasks: TasksStateTasks,
2996
+ TaskState: TaskState,
2997
+ AnalyzeTextJobStatistics: AnalyzeTextJobStatistics,
2998
+ TextDocumentBatchStatistics: TextDocumentBatchStatistics,
2999
+ LanguageDetectionAnalysisInput: LanguageDetectionAnalysisInput,
3000
+ LanguageDetectionInput: LanguageDetectionInput,
3001
+ ActionCommon: ActionCommon,
3002
+ PreBuiltResult: PreBuiltResult,
3003
+ DocumentError: DocumentError,
3004
+ CustomResult: CustomResult,
3005
+ Entity: Entity,
3006
+ DocumentResult: DocumentResult,
3007
+ DocumentWarning: DocumentWarning,
3008
+ TextDocumentStatistics: TextDocumentStatistics,
3009
+ ClassificationCategory: ClassificationCategory,
3010
+ HealthcareEntity: HealthcareEntity,
3011
+ HealthcareAssertion: HealthcareAssertion,
3012
+ EntityDataSource: EntityDataSource,
3013
+ HealthcareRelation: HealthcareRelation,
3014
+ HealthcareRelationEntity: HealthcareRelationEntity,
3015
+ SentimentConfidenceScores: SentimentConfidenceScores,
3016
+ SentenceSentiment: SentenceSentiment,
3017
+ SentenceTarget: SentenceTarget,
3018
+ TargetConfidenceScores: TargetConfidenceScores,
3019
+ TargetRelation: TargetRelation,
3020
+ AssessmentSentiment: AssessmentSentiment,
3021
+ LinkedEntity: LinkedEntity,
3022
+ Match: Match,
3023
+ SummarySentence: SummarySentence,
3024
+ DetectedLanguage: DetectedLanguage,
3025
+ Pagination: Pagination,
3026
+ JobMetadata: JobMetadata,
3027
+ JobErrors: JobErrors,
3028
+ AnalyzeTextEntityLinkingInput: AnalyzeTextEntityLinkingInput,
3029
+ AnalyzeTextEntityRecognitionInput: AnalyzeTextEntityRecognitionInput,
3030
+ AnalyzeTextKeyPhraseExtractionInput: AnalyzeTextKeyPhraseExtractionInput,
3031
+ AnalyzeTextPiiEntitiesRecognitionInput: AnalyzeTextPiiEntitiesRecognitionInput,
3032
+ AnalyzeTextLanguageDetectionInput: AnalyzeTextLanguageDetectionInput,
3033
+ AnalyzeTextSentimentAnalysisInput: AnalyzeTextSentimentAnalysisInput,
3034
+ SentimentTaskResult: SentimentTaskResult,
3035
+ EntitiesTaskResult: EntitiesTaskResult,
3036
+ EntityLinkingTaskResult: EntityLinkingTaskResult,
3037
+ PiiTaskResult: PiiTaskResult,
3038
+ KeyPhraseTaskResult: KeyPhraseTaskResult,
3039
+ LanguageDetectionTaskResult: LanguageDetectionTaskResult,
3040
+ AnalyzeBatchAction: AnalyzeBatchAction,
3041
+ AnalyzeTextLROResult: AnalyzeTextLROResult,
3042
+ AnalyzeTextJobState: AnalyzeTextJobState,
3043
+ ActionPrebuilt: ActionPrebuilt,
3044
+ ActionCustom: ActionCustom,
3045
+ HealthcareResult: HealthcareResult,
3046
+ SentimentResponse: SentimentResponse,
3047
+ EntitiesResult: EntitiesResult,
3048
+ EntityLinkingResult: EntityLinkingResult,
3049
+ PiiResult: PiiResult,
3050
+ ExtractiveSummarizationResult: ExtractiveSummarizationResult,
3051
+ KeyPhraseResult: KeyPhraseResult,
3052
+ LanguageDetectionResult: LanguageDetectionResult,
3053
+ CustomEntitiesResult: CustomEntitiesResult,
3054
+ CustomSingleLabelClassificationResult: CustomSingleLabelClassificationResult,
3055
+ CustomMultiLabelClassificationResult: CustomMultiLabelClassificationResult,
3056
+ EntitiesDocumentResult: EntitiesDocumentResult,
3057
+ SingleClassificationDocumentResult: SingleClassificationDocumentResult,
3058
+ MultiClassificationDocumentResult: MultiClassificationDocumentResult,
3059
+ HealthcareEntitiesDocumentResult: HealthcareEntitiesDocumentResult,
3060
+ SentimentDocumentResult: SentimentDocumentResult,
3061
+ LinkedEntitiesDocumentResult: LinkedEntitiesDocumentResult,
3062
+ PiiEntitiesDocumentResult: PiiEntitiesDocumentResult,
3063
+ ExtractedSummaryDocumentResult: ExtractedSummaryDocumentResult,
3064
+ KeyPhrasesDocumentResult: KeyPhrasesDocumentResult,
3065
+ LanguageDetectionDocumentResult: LanguageDetectionDocumentResult,
3066
+ CustomEntitiesLROTask: CustomEntitiesLROTask,
3067
+ CustomSingleLabelClassificationLROTask: CustomSingleLabelClassificationLROTask,
3068
+ CustomMultiLabelClassificationLROTask: CustomMultiLabelClassificationLROTask,
3069
+ HealthcareLROTask: HealthcareLROTask,
3070
+ SentimentAnalysisLROTask: SentimentAnalysisLROTask,
3071
+ EntitiesLROTask: EntitiesLROTask,
3072
+ EntityLinkingLROTask: EntityLinkingLROTask,
3073
+ PiiLROTask: PiiLROTask,
3074
+ ExtractiveSummarizationLROTask: ExtractiveSummarizationLROTask,
3075
+ KeyPhraseLROTask: KeyPhraseLROTask,
3076
+ EntityRecognitionLROResult: EntityRecognitionLROResult,
3077
+ CustomEntityRecognitionLROResult: CustomEntityRecognitionLROResult,
3078
+ CustomSingleLabelClassificationLROResult: CustomSingleLabelClassificationLROResult,
3079
+ CustomMultiLabelClassificationLROResult: CustomMultiLabelClassificationLROResult,
3080
+ EntityLinkingLROResult: EntityLinkingLROResult,
3081
+ PiiEntityRecognitionLROResult: PiiEntityRecognitionLROResult,
3082
+ ExtractiveSummarizationLROResult: ExtractiveSummarizationLROResult,
3083
+ HealthcareLROResult: HealthcareLROResult,
3084
+ SentimentLROResult: SentimentLROResult,
3085
+ KeyPhraseExtractionLROResult: KeyPhraseExtractionLROResult,
3086
+ EntityLinkingAction: EntityLinkingAction,
3087
+ EntityRecognitionAction: EntityRecognitionAction,
3088
+ KeyPhraseExtractionAction: KeyPhraseExtractionAction,
3089
+ PiiEntityRecognitionAction: PiiEntityRecognitionAction,
3090
+ LanguageDetectionAction: LanguageDetectionAction,
3091
+ SentimentAnalysisAction: SentimentAnalysisAction,
3092
+ HealthcareAction: HealthcareAction,
3093
+ ExtractiveSummarizationAction: ExtractiveSummarizationAction,
3094
+ CustomEntityRecognitionAction: CustomEntityRecognitionAction,
3095
+ CustomSingleLabelClassificationAction: CustomSingleLabelClassificationAction,
3096
+ CustomMultiLabelClassificationAction: CustomMultiLabelClassificationAction,
3097
+ CustomEntitiesResultDocumentsItem: CustomEntitiesResultDocumentsItem,
3098
+ EntitiesResultDocumentsItem: EntitiesResultDocumentsItem,
3099
+ CustomSingleLabelClassificationResultDocumentsItem: CustomSingleLabelClassificationResultDocumentsItem,
3100
+ CustomMultiLabelClassificationResultDocumentsItem: CustomMultiLabelClassificationResultDocumentsItem,
3101
+ HealthcareResultDocumentsItem: HealthcareResultDocumentsItem,
3102
+ SentimentResponseDocumentsItem: SentimentResponseDocumentsItem,
3103
+ EntityLinkingResultDocumentsItem: EntityLinkingResultDocumentsItem,
3104
+ PiiResultDocumentsItem: PiiResultDocumentsItem,
3105
+ ExtractiveSummarizationResultDocumentsItem: ExtractiveSummarizationResultDocumentsItem,
3106
+ KeyPhraseResultDocumentsItem: KeyPhraseResultDocumentsItem,
3107
+ AnalyzeTextSubmitJobHeaders: AnalyzeTextSubmitJobHeaders,
3108
+ AnalyzeTextCancelJobHeaders: AnalyzeTextCancelJobHeaders,
3109
+ discriminators: discriminators
3110
+ });
3111
+
3112
+ /*
3113
+ * Copyright (c) Microsoft Corporation.
3114
+ * Licensed under the MIT License.
3115
+ *
3116
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3117
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3118
+ */
3119
+ const contentType = {
3120
+ parameterPath: ["options", "contentType"],
3121
+ mapper: {
3122
+ defaultValue: "application/json",
3123
+ isConstant: true,
3124
+ serializedName: "Content-Type",
3125
+ type: {
3126
+ name: "String"
3127
+ }
3128
+ }
3129
+ };
3130
+ const body = {
3131
+ parameterPath: "body",
3132
+ mapper: AnalyzeAction
3133
+ };
3134
+ const accept = {
3135
+ parameterPath: "accept",
3136
+ mapper: {
3137
+ defaultValue: "application/json",
3138
+ isConstant: true,
3139
+ serializedName: "Accept",
3140
+ type: {
3141
+ name: "String"
3142
+ }
3143
+ }
3144
+ };
3145
+ const endpoint = {
3146
+ parameterPath: "endpoint",
3147
+ mapper: {
3148
+ serializedName: "Endpoint",
3149
+ required: true,
3150
+ type: {
3151
+ name: "String"
3152
+ }
3153
+ },
3154
+ skipEncoding: true
3155
+ };
3156
+ const apiVersion = {
3157
+ parameterPath: "apiVersion",
3158
+ mapper: {
3159
+ defaultValue: "2022-04-01-preview",
3160
+ isConstant: true,
3161
+ serializedName: "api-version",
3162
+ type: {
3163
+ name: "String"
3164
+ }
3165
+ }
3166
+ };
3167
+ const includeStatistics = {
3168
+ parameterPath: ["options", "includeStatistics"],
3169
+ mapper: {
3170
+ serializedName: "showStats",
3171
+ type: {
3172
+ name: "Boolean"
3173
+ }
3174
+ }
3175
+ };
3176
+ const body1 = {
3177
+ parameterPath: "body",
3178
+ mapper: AnalyzeTextJobsInput
3179
+ };
3180
+ const jobId = {
3181
+ parameterPath: "jobId",
3182
+ mapper: {
3183
+ serializedName: "jobId",
3184
+ required: true,
3185
+ type: {
3186
+ name: "Uuid"
3187
+ }
3188
+ }
3189
+ };
3190
+ const top = {
3191
+ parameterPath: ["options", "top"],
3192
+ mapper: {
3193
+ serializedName: "top",
3194
+ type: {
3195
+ name: "Number"
3196
+ }
3197
+ }
3198
+ };
3199
+ const skip = {
3200
+ parameterPath: ["options", "skip"],
3201
+ mapper: {
3202
+ serializedName: "skip",
3203
+ type: {
3204
+ name: "Number"
3205
+ }
3206
+ }
3207
+ };
3208
+
3209
+ // Copyright (c) Microsoft Corporation.
3210
+ /**
3211
+ * Helper function for converting nested service error to the unified
3212
+ * TextAnalysisError
3213
+ */
3214
+ function toTextAnalysisError(errorModel) {
3215
+ // Return the deepest error.
3216
+ if (errorModel.innererror !== undefined) {
3217
+ return toTextAnalysisError(errorModel.innererror);
3218
+ }
3219
+ return Object.assign({}, errorModel);
3220
+ }
3221
+ function makeTextAnalysisErrorResult(id, error) {
3222
+ return {
3223
+ id,
3224
+ error: toTextAnalysisError(error),
3225
+ };
3226
+ }
3227
+ /**
3228
+ * combines successful and erroneous results into a single array of results and
3229
+ * sort them so that the IDs order match that of the input documents array.
3230
+ * @param input - the array of documents sent to the service for processing.
3231
+ * @param response - the response received from the service.
3232
+ * @param options - an options bag that includes functions to process the results.
3233
+ */
3234
+ function transformDocumentResults(input, response, options) {
3235
+ const { processError = makeTextAnalysisErrorResult, processSuccess } = options || {};
3236
+ const successResults = processSuccess
3237
+ ? response.documents.map(processSuccess)
3238
+ : response.documents;
3239
+ const unsortedResults = successResults.concat(response.errors.map((error) => processError(error.id, error.error)));
3240
+ return sortResponseIdObjects(input, unsortedResults);
3241
+ }
3242
+ function toLanguageDetectionResult(documents, results) {
3243
+ return transformDocumentResults(documents, results, {
3244
+ processSuccess: (_a) => {
3245
+ var { detectedLanguage } = _a, rest = tslib.__rest(_a, ["detectedLanguage"]);
3246
+ return (Object.assign({ primaryLanguage: detectedLanguage }, rest));
3247
+ },
3248
+ });
3249
+ }
3250
+ function toPiiEntityRecognitionResult(documents, results) {
3251
+ return transformDocumentResults(documents, results);
3252
+ }
3253
+ function toSentimentAnalysisResult(documents, results) {
3254
+ return transformDocumentResults(documents, results, {
3255
+ processSuccess: (_a) => {
3256
+ var { sentences } = _a, rest = tslib.__rest(_a, ["sentences"]);
3257
+ return (Object.assign(Object.assign({}, rest), { sentences: sentences.map((sentence) => convertGeneratedSentenceSentiment(sentence, sentences)) }));
3258
+ },
3259
+ });
3260
+ }
3261
+ /**
3262
+ * Converts a sentence sentiment object returned by the service to another that
3263
+ * is user-friendly.
3264
+ *
3265
+ * @param sentence - The sentence sentiment object to be converted.
3266
+ * @param response - The entire response returned by the service.
3267
+ * @returns The user-friendly sentence sentiment object.
3268
+ * @internal
3269
+ */
3270
+ function convertGeneratedSentenceSentiment(_a, sentences) {
3271
+ var _b;
3272
+ var { targets, assessments: _ } = _a, rest = tslib.__rest(_a, ["targets", "assessments"]);
3273
+ return Object.assign(Object.assign({}, rest), { opinions: (_b = targets === null || targets === void 0 ? void 0 : targets.map(
3274
+ // eslint-disable-next-line @typescript-eslint/no-shadow
3275
+ (_a) => {
3276
+ var { relations } = _a, rest = tslib.__rest(_a, ["relations"]);
3277
+ return ({
3278
+ target: rest,
3279
+ assessments: relations
3280
+ .filter((relation) => relation.relationType === "assessment")
3281
+ .map((relation) => convertTargetRelationToAssessmentSentiment(relation, sentences)),
3282
+ });
3283
+ })) !== null && _b !== void 0 ? _b : [] });
3284
+ }
3285
+ /**
3286
+ * Converts a target relation object returned by the service to an assessment
3287
+ * sentiment object where JSON pointers in the former are realized in the
3288
+ * latter.
3289
+ *
3290
+ * @param targetRelation - The target relation object to be converted.
3291
+ * @param response - The entire response returned by the service.
3292
+ * @returns The user-friendly assessment sentiment object.
3293
+ * @internal
3294
+ */
3295
+ function convertTargetRelationToAssessmentSentiment(targetRelation, sentences) {
3296
+ var _a;
3297
+ const assessmentPtr = targetRelation.ref;
3298
+ const assessmentIndex = parseAssessmentIndex(assessmentPtr);
3299
+ const assessment = (_a = sentences === null || sentences === void 0 ? void 0 : sentences[assessmentIndex.sentence].assessments) === null || _a === void 0 ? void 0 : _a[assessmentIndex.assessment];
3300
+ if (assessment !== undefined) {
3301
+ return assessment;
3302
+ }
3303
+ else {
3304
+ throw new Error(`Pointer "${assessmentPtr}" is not a valid Assessment pointer`);
3305
+ }
3306
+ }
3307
+ function toEntityLinkingResult(documents, results) {
3308
+ return transformDocumentResults(documents, results);
3309
+ }
3310
+ function toKeyPhraseExtractionResult(documents, results) {
3311
+ return transformDocumentResults(documents, results);
3312
+ }
3313
+ function toEntityRecognitionResult(documents, results) {
3314
+ return transformDocumentResults(documents, results);
3315
+ }
3316
+ /**
3317
+ * @internal
3318
+ */
3319
+ function transformActionResult(actionName, input, response) {
3320
+ switch (response.kind) {
3321
+ case "EntityLinkingResults": {
3322
+ return toEntityLinkingResult(input, response.results);
3323
+ }
3324
+ case "EntityRecognitionResults": {
3325
+ return toEntityRecognitionResult(input, response.results);
3326
+ }
3327
+ case "KeyPhraseExtractionResults": {
3328
+ return toKeyPhraseExtractionResult(input, response.results);
3329
+ }
3330
+ case "PiiEntityRecognitionResults": {
3331
+ return toPiiEntityRecognitionResult(input, response.results);
3332
+ }
3333
+ case "SentimentAnalysisResults": {
3334
+ return toSentimentAnalysisResult(input, response.results);
3335
+ }
3336
+ case "LanguageDetectionResults": {
3337
+ return toLanguageDetectionResult(input, response.results);
3338
+ }
3339
+ default: {
3340
+ const __exhaust = response;
3341
+ throw new Error(`Unsupported results kind: ${__exhaust} for an action of type ${actionName}`);
3342
+ }
3343
+ }
3344
+ }
3345
+ function appendReadableErrorMessage(currentMessage, innerMessage) {
3346
+ let message = currentMessage;
3347
+ if (message.slice(-1) !== ".") {
3348
+ message = message + ".";
3349
+ }
3350
+ return message + " " + innerMessage;
3351
+ }
3352
+ /**
3353
+ * @internal
3354
+ * parses incoming errors from the service/
3355
+ * @param error - the incoming error
3356
+ */
3357
+ function transformError(errorResponse) {
3358
+ var _a;
3359
+ const strongErrorResponse = errorResponse;
3360
+ if (!strongErrorResponse.response) {
3361
+ throw errorResponse;
3362
+ }
3363
+ const topLevelError = (_a = strongErrorResponse.response.parsedBody) === null || _a === void 0 ? void 0 : _a.error;
3364
+ if (!topLevelError)
3365
+ return errorResponse;
3366
+ let errorMessage = topLevelError.message;
3367
+ let code = topLevelError.code;
3368
+ function unwrap(error) {
3369
+ const innerError = error.innererror;
3370
+ if (innerError) {
3371
+ if (innerError.message) {
3372
+ errorMessage = appendReadableErrorMessage(errorMessage, innerError.message);
3373
+ }
3374
+ if (innerError.code) {
3375
+ code = innerError.code;
3376
+ }
3377
+ return unwrap(innerError);
3378
+ }
3379
+ return error;
3380
+ }
3381
+ unwrap(topLevelError);
3382
+ return new coreRestPipeline.RestError(errorMessage, {
3383
+ code,
3384
+ statusCode: strongErrorResponse.statusCode,
3385
+ });
3386
+ }
3387
+ async function throwError(p) {
3388
+ try {
3389
+ return await p;
3390
+ }
3391
+ catch (e) {
3392
+ throw transformError(e);
3393
+ }
3394
+ }
3395
+ function toHealthcareResult(documents, results) {
3396
+ function makeHealthcareEntity(entity) {
3397
+ const { dataSources } = entity, rest = tslib.__rest(entity, ["dataSources"]);
3398
+ return Object.assign({ dataSources: dataSources !== null && dataSources !== void 0 ? dataSources : [] }, rest);
3399
+ }
3400
+ function makeHealthcareRelation(entities) {
3401
+ return (relation) => ({
3402
+ relationType: relation.relationType,
3403
+ roles: relation.entities.map((role) => ({
3404
+ entity: entities[parseHealthcareEntityIndex(role.ref)],
3405
+ name: role.role,
3406
+ })),
3407
+ });
3408
+ }
3409
+ return transformDocumentResults(documents, results, {
3410
+ processSuccess: (_a) => {
3411
+ var { entities, relations } = _a, rest = tslib.__rest(_a, ["entities", "relations"]);
3412
+ const newEntities = entities.map(makeHealthcareEntity);
3413
+ return Object.assign({ entities: newEntities, entityRelations: relations.map(makeHealthcareRelation(newEntities)) }, rest);
3414
+ },
3415
+ });
3416
+ }
3417
+ function toCustomSingleLabelClassificationResult(documents, results) {
3418
+ return transformDocumentResults(documents, results, {
3419
+ processSuccess: (_a) => {
3420
+ var { classification } = _a, rest = tslib.__rest(_a, ["classification"]);
3421
+ return Object.assign({ classifications: [classification] }, rest);
3422
+ },
3423
+ });
3424
+ }
3425
+ /**
3426
+ * @internal
3427
+ */
3428
+ function transformAnalyzeBatchResults(documents, response = []) {
3429
+ return response.map((actionData) => {
3430
+ const { lastUpdateDateTime: completedOn, actionName, kind } = actionData;
3431
+ switch (kind) {
3432
+ case "SentimentAnalysisLROResults": {
3433
+ const { results } = actionData;
3434
+ const { modelVersion, statistics } = results;
3435
+ return Object.assign(Object.assign(Object.assign({ kind: "SentimentAnalysis", results: toSentimentAnalysisResult(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
3436
+ }
3437
+ case "EntityRecognitionLROResults": {
3438
+ const { results } = actionData;
3439
+ const { modelVersion, statistics } = results;
3440
+ return Object.assign(Object.assign(Object.assign({ kind: "EntityRecognition", results: toEntityRecognitionResult(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
3441
+ }
3442
+ case "PiiEntityRecognitionLROResults": {
3443
+ const { results } = actionData;
3444
+ const { modelVersion, statistics } = results;
3445
+ return Object.assign(Object.assign(Object.assign({ kind: "PiiEntityRecognition", results: toPiiEntityRecognitionResult(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
3446
+ }
3447
+ case "KeyPhraseExtractionLROResults": {
3448
+ const { results } = actionData;
3449
+ const { modelVersion, statistics } = results;
3450
+ return Object.assign(Object.assign(Object.assign({ kind: "KeyPhraseExtraction", results: toKeyPhraseExtractionResult(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
3451
+ }
3452
+ case "EntityLinkingLROResults": {
3453
+ const { results } = actionData;
3454
+ const { modelVersion, statistics } = results;
3455
+ return Object.assign(Object.assign(Object.assign({ kind: "EntityLinking", results: toEntityLinkingResult(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
3456
+ }
3457
+ case "HealthcareLROResults": {
3458
+ const { results } = actionData;
3459
+ const { modelVersion, statistics } = results;
3460
+ return Object.assign(Object.assign(Object.assign({ kind: "Healthcare", results: toHealthcareResult(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
3461
+ }
3462
+ case "CustomEntityRecognitionLROResults": {
3463
+ const { results } = actionData;
3464
+ const { deploymentName, projectName, statistics } = results;
3465
+ return Object.assign(Object.assign(Object.assign({ kind: "CustomEntityRecognition", results: transformDocumentResults(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { deploymentName,
3466
+ projectName });
3467
+ }
3468
+ case "CustomSingleLabelClassificationLROResults": {
3469
+ const { results } = actionData;
3470
+ const { deploymentName, projectName, statistics } = results;
3471
+ return Object.assign(Object.assign(Object.assign({ kind: "CustomSingleLabelClassification", results: toCustomSingleLabelClassificationResult(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { deploymentName,
3472
+ projectName });
3473
+ }
3474
+ case "CustomMultiLabelClassificationLROResults": {
3475
+ const { results } = actionData;
3476
+ const { deploymentName, projectName, statistics } = results;
3477
+ return Object.assign(Object.assign(Object.assign({ kind: "CustomMultiLabelClassification", results: transformDocumentResults(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { deploymentName,
3478
+ projectName });
3479
+ }
3480
+ case "ExtractiveSummarizationLROResults": {
3481
+ const { results } = actionData;
3482
+ const { modelVersion, statistics } = results;
3483
+ return Object.assign(Object.assign(Object.assign({ kind: "ExtractiveSummarization", results: transformDocumentResults(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
3484
+ }
3485
+ default: {
3486
+ throw new Error(`Unsupported results kind: ${kind}`);
3487
+ }
3488
+ }
3489
+ });
3490
+ }
3491
+
3492
+ // Copyright (c) Microsoft Corporation.
3493
+ const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
3494
+ const jobStatusOperationSpec$1 = {
3495
+ httpMethod: "GET",
3496
+ responses: {
3497
+ 200: {
3498
+ bodyMapper: AnalyzeTextJobState,
3499
+ },
3500
+ default: {
3501
+ bodyMapper: ErrorResponse,
3502
+ },
3503
+ },
3504
+ headerParameters: [accept],
3505
+ queryParameters: [top, skip, includeStatistics],
3506
+ serializer: serializer$2,
3507
+ };
3508
+ async function getRawResponse(getResponse, options) {
3509
+ const { onResponse } = options || {};
3510
+ let rawResponse = undefined;
3511
+ const flatResponse = await getResponse(Object.assign(Object.assign({}, options), { onResponse: (response, flatResponseParam) => {
3512
+ rawResponse = response;
3513
+ onResponse === null || onResponse === void 0 ? void 0 : onResponse(response, flatResponseParam);
3514
+ } }));
3515
+ return {
3516
+ flatResponse,
3517
+ rawResponse: {
3518
+ statusCode: rawResponse.status,
3519
+ headers: rawResponse.headers.toJSON(),
3520
+ body: rawResponse.parsedBody,
3521
+ },
3522
+ };
3523
+ }
3524
+ async function sendRequest(settings) {
3525
+ const { client, opOptions, path, spanStr, spec, tracing, httpMethod = "GET" } = settings;
3526
+ return tracing.withSpan(spanStr, opOptions, async (finalOptions) => throwError(getRawResponse((options) => client.sendOperationRequest({ options }, Object.assign(Object.assign({}, spec), { path,
3527
+ httpMethod })), finalOptions)));
3528
+ }
3529
+ /**
3530
+ * @internal
3531
+ */
3532
+ function createSendPollRequest(settings) {
3533
+ const { client, options, tracing, spanStr } = settings;
3534
+ return async (path) => {
3535
+ return throwError(sendRequest({
3536
+ client,
3537
+ opOptions: options,
3538
+ path,
3539
+ spanStr,
3540
+ spec: jobStatusOperationSpec$1,
3541
+ tracing,
3542
+ }));
3543
+ };
3544
+ }
3545
+ /**
3546
+ * @internal
3547
+ */
3548
+ function createAnalyzeBatchLro(settings) {
3549
+ const { client, commonOptions, documents, initialRequestOptions, pollRequestOptions, tasks, tracing, } = settings;
3550
+ return {
3551
+ requestMethod: "POST",
3552
+ requestPath: "/analyze-text/jobs",
3553
+ async sendInitialRequest() {
3554
+ return tracing.withSpan(`${clientName}.beginAnalyzeBatch`, Object.assign(Object.assign({}, commonOptions), initialRequestOptions), async (finalOptions) => throwError(getRawResponse((paramOptions) => client.analyzeText.submitJob({
3555
+ tasks,
3556
+ analysisInput: {
3557
+ documents,
3558
+ },
3559
+ displayName: initialRequestOptions.displayName,
3560
+ }, paramOptions), finalOptions)));
3561
+ },
3562
+ sendPollRequest: createSendPollRequest({
3563
+ client,
3564
+ options: Object.assign(Object.assign({}, commonOptions), pollRequestOptions),
3565
+ spanStr: `${clientName}.beginAnalyzeBatch`,
3566
+ tracing,
3567
+ }),
3568
+ };
3569
+ }
3570
+ /**
3571
+ * @internal
3572
+ */
3573
+ function getDocsFromState(serializedState) {
3574
+ try {
3575
+ const { documents } = JSON.parse(serializedState).state;
3576
+ return documents;
3577
+ }
3578
+ catch (e) {
3579
+ logger.error(`Documents are not found in the LRO's state. The results may not be ordered correctly.`);
3580
+ return [];
3581
+ }
3582
+ }
3583
+ /**
3584
+ * @internal
3585
+ */
3586
+ function createCreateAnalyzeBatchPollerLro(settings) {
3587
+ const { client, options, tracing } = settings;
3588
+ return {
3589
+ requestMethod: "POST",
3590
+ requestPath: "/analyze-text/jobs",
3591
+ async sendInitialRequest() {
3592
+ throw new Error(`The operation has already started`);
3593
+ },
3594
+ sendPollRequest: createSendPollRequest({
3595
+ client,
3596
+ options,
3597
+ spanStr: `${clientName}.beginAnalyzeBatch`,
3598
+ tracing,
3599
+ }),
3600
+ };
3601
+ }
3602
+ /**
3603
+ * @internal
3604
+ */
3605
+ function processAnalyzeResult(options) {
3606
+ return (_result, state) => {
3607
+ const { client, documents, opOptions, tracing, continuationToken } = options;
3608
+ const pageURL = continuationToken !== null && continuationToken !== void 0 ? continuationToken : state.pollingURL;
3609
+ const pagedResult = {
3610
+ firstPageLink: pageURL,
3611
+ getPage: async (pageLink, maxPageSize) => {
3612
+ const response = await sendRequest({
3613
+ client,
3614
+ spec: jobStatusOperationSpec$1,
3615
+ spanStr: `${clientName}.beginAnalyzeBatch`,
3616
+ // if `top` is set to `undefined`, the default value will not be sent
3617
+ // as part of the request.
3618
+ opOptions: maxPageSize ? Object.assign(Object.assign({}, opOptions), { top: maxPageSize }) : opOptions,
3619
+ path: pageLink,
3620
+ tracing,
3621
+ });
3622
+ const flatResponse = response.flatResponse;
3623
+ return {
3624
+ page: transformAnalyzeBatchResults(documents, flatResponse.tasks.items),
3625
+ nextPageLink: flatResponse.nextLink,
3626
+ };
3627
+ },
3628
+ };
3629
+ return corePaging.getPagedAsyncIterator(pagedResult);
3630
+ };
3631
+ }
3632
+ /**
3633
+ * @internal
3634
+ */
3635
+ function createUpdateAnalyzeState(documents) {
3636
+ return (state, lastResponse) => {
3637
+ const { createdOn, modifiedOn, id, status, displayName, expiresOn, tasks } = lastResponse.body;
3638
+ const mutableState = state;
3639
+ mutableState.createdOn = createdOn;
3640
+ mutableState.modifiedOn = modifiedOn;
3641
+ mutableState.expiresOn = expiresOn;
3642
+ mutableState.displayName = displayName;
3643
+ mutableState.id = id;
3644
+ mutableState.status = status;
3645
+ mutableState.actionSucceededCount = tasks.completed;
3646
+ mutableState.actionFailedCount = tasks.failed;
3647
+ mutableState.actionInProgressCount = tasks.inProgress;
3648
+ if (mutableState.documents === undefined && documents !== undefined) {
3649
+ mutableState.documents = documents;
3650
+ }
3651
+ };
3652
+ }
3653
+ /**
3654
+ * @internal
3655
+ */
3656
+ function createCancelOperation(settings) {
3657
+ return async ({ id }) => {
3658
+ const { client, options, tracing } = settings;
3659
+ await tracing.withSpan(`${clientName}.beginAnalyzeBatch`, options, async (finalOptions) => throwError(getRawResponse((paramOptions) => client.analyzeText.cancelJob(id, paramOptions), finalOptions)));
3660
+ };
3661
+ }
3662
+
3663
+ /*
3664
+ * Copyright (c) Microsoft Corporation.
3665
+ * Licensed under the MIT License.
3666
+ *
3667
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3668
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3669
+ */
3670
+ /** Class containing AnalyzeText operations. */
3671
+ class AnalyzeTextImpl {
3672
+ /**
3673
+ * Initialize a new instance of the class AnalyzeText class.
3674
+ * @param client Reference to the service client
3675
+ */
3676
+ constructor(client) {
3677
+ this.client = client;
3678
+ }
3679
+ /**
3680
+ * Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed
3681
+ * as a long-running operation.
3682
+ * @param body Collection of documents to analyze and one or more tasks to execute.
3683
+ * @param options The options parameters.
3684
+ */
3685
+ submitJob(body, options) {
3686
+ return this.client.sendOperationRequest({ body, options }, submitJobOperationSpec);
3687
+ }
3688
+ /**
3689
+ * Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are
3690
+ * succeeded, the job will transition to the succeeded state and results will be available for each
3691
+ * task.
3692
+ * @param jobId Job ID
3693
+ * @param options The options parameters.
3694
+ */
3695
+ jobStatus(jobId, options) {
3696
+ return this.client.sendOperationRequest({ jobId, options }, jobStatusOperationSpec);
3697
+ }
3698
+ /**
3699
+ * Cancel a long-running Text Analysis job.
3700
+ * @param jobId Job ID
3701
+ * @param options The options parameters.
3702
+ */
3703
+ cancelJob(jobId, options) {
3704
+ return this.client.sendOperationRequest({ jobId, options }, cancelJobOperationSpec);
3705
+ }
3706
+ }
3707
+ // Operation Specifications
3708
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3709
+ const submitJobOperationSpec = {
3710
+ path: "/analyze-text/jobs",
3711
+ httpMethod: "POST",
3712
+ responses: {
3713
+ 202: {
3714
+ headersMapper: AnalyzeTextSubmitJobHeaders
3715
+ },
3716
+ default: {
3717
+ bodyMapper: ErrorResponse
3718
+ }
3719
+ },
3720
+ requestBody: body1,
3721
+ queryParameters: [apiVersion],
3722
+ urlParameters: [endpoint],
3723
+ headerParameters: [contentType, accept],
3724
+ mediaType: "json",
3725
+ serializer: serializer$1
3726
+ };
3727
+ const jobStatusOperationSpec = {
3728
+ path: "/analyze-text/jobs/{jobId}",
3729
+ httpMethod: "GET",
3730
+ responses: {
3731
+ 200: {
3732
+ bodyMapper: AnalyzeTextJobState
3733
+ },
3734
+ default: {
3735
+ bodyMapper: ErrorResponse
3736
+ }
3737
+ },
3738
+ queryParameters: [
3739
+ apiVersion,
3740
+ includeStatistics,
3741
+ top,
3742
+ skip
3743
+ ],
3744
+ urlParameters: [endpoint, jobId],
3745
+ headerParameters: [accept],
3746
+ serializer: serializer$1
3747
+ };
3748
+ const cancelJobOperationSpec = {
3749
+ path: "/analyze-text/jobs/{jobId}:cancel",
3750
+ httpMethod: "POST",
3751
+ responses: {
3752
+ 202: {
3753
+ headersMapper: AnalyzeTextCancelJobHeaders
3754
+ },
3755
+ default: {
3756
+ bodyMapper: ErrorResponse
3757
+ }
3758
+ },
3759
+ queryParameters: [apiVersion],
3760
+ urlParameters: [endpoint, jobId],
3761
+ headerParameters: [accept],
3762
+ serializer: serializer$1
3763
+ };
3764
+
3765
+ /*
3766
+ * Copyright (c) Microsoft Corporation.
3767
+ * Licensed under the MIT License.
3768
+ *
3769
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3770
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3771
+ */
3772
+ /** @internal */
3773
+ class GeneratedClient extends coreClient__namespace.ServiceClient {
3774
+ /**
3775
+ * Initializes a new instance of the GeneratedClient class.
3776
+ * @param endpoint Supported Cognitive Services endpoint (e.g.,
3777
+ * https://<resource-name>.api.cognitiveservices.azure.com).
3778
+ * @param options The parameter options
3779
+ */
3780
+ constructor(endpoint, options) {
3781
+ var _a, _b;
3782
+ if (endpoint === undefined) {
3783
+ throw new Error("'endpoint' cannot be null");
3784
+ }
3785
+ // Initializing default values for options
3786
+ if (!options) {
3787
+ options = {};
3788
+ }
3789
+ const defaults = {
3790
+ requestContentType: "application/json; charset=utf-8"
3791
+ };
3792
+ const packageDetails = `azsdk-js-ai-language-text/1.0.0-beta.1`;
3793
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3794
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3795
+ : `${packageDetails}`;
3796
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
3797
+ userAgentPrefix
3798
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{Endpoint}/language" });
3799
+ super(optionsWithDefaults);
3800
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
3801
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
3802
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
3803
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
3804
+ if (!bearerTokenAuthenticationPolicyFound) {
3805
+ this.pipeline.removePolicy({
3806
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
3807
+ });
3808
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
3809
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
3810
+ challengeCallbacks: {
3811
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3812
+ }
3813
+ }));
3814
+ }
3815
+ }
3816
+ // Parameter assignments
3817
+ this.endpoint = endpoint;
3818
+ // Assigning values to Constant parameters
3819
+ this.apiVersion = options.apiVersion || "2022-04-01-preview";
3820
+ this.analyzeText = new AnalyzeTextImpl(this);
3821
+ this.addCustomApiVersionPolicy(options.apiVersion);
3822
+ }
3823
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
3824
+ addCustomApiVersionPolicy(apiVersion) {
3825
+ if (!apiVersion) {
3826
+ return;
3827
+ }
3828
+ const apiVersionPolicy = {
3829
+ name: "CustomApiVersionPolicy",
3830
+ async sendRequest(request, next) {
3831
+ const param = request.url.split("?");
3832
+ if (param.length > 1) {
3833
+ const newParams = param[1].split("&").map((item) => {
3834
+ if (item.indexOf("api-version") > -1) {
3835
+ return "api-version=" + apiVersion;
3836
+ }
3837
+ else {
3838
+ return item;
3839
+ }
3840
+ });
3841
+ request.url = param[0] + "?" + newParams.join("&");
3842
+ }
3843
+ return next(request);
3844
+ }
3845
+ };
3846
+ this.pipeline.addPolicy(apiVersionPolicy);
3847
+ }
3848
+ /**
3849
+ * Submit a collection of text documents for analysis. Specify a single unique task to be executed
3850
+ * immediately.
3851
+ * @param body Collection of documents to analyze and a single task to execute.
3852
+ * @param options The options parameters.
3853
+ */
3854
+ analyze(body, options) {
3855
+ return this.sendOperationRequest({ body, options }, analyzeOperationSpec);
3856
+ }
3857
+ }
3858
+ // Operation Specifications
3859
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3860
+ const analyzeOperationSpec = {
3861
+ path: "/:analyze-text",
3862
+ httpMethod: "POST",
3863
+ responses: {
3864
+ 200: {
3865
+ bodyMapper: AnalyzeTextTaskResult
3866
+ },
3867
+ default: {
3868
+ bodyMapper: ErrorResponse
3869
+ }
3870
+ },
3871
+ requestBody: body,
3872
+ queryParameters: [apiVersion, includeStatistics],
3873
+ urlParameters: [endpoint],
3874
+ headerParameters: [contentType, accept],
3875
+ mediaType: "json",
3876
+ serializer
3877
+ };
3878
+
3879
+ // Copyright (c) Microsoft Corporation.
3880
+ // Licensed under the MIT license.
3881
+ const API_KEY_HEADER_NAME = "Ocp-Apim-Subscription-Key";
3882
+ /**
3883
+ * The programmatic identifier of the textAnalyticsAzureKeyCredentialPolicy.
3884
+ */
3885
+ const textAnalyticsAzureKeyCredentialPolicyName = "textAnalyticsAzureKeyCredentialPolicy";
3886
+ /**
3887
+ * Create an HTTP pipeline policy to authenticate a request
3888
+ * using an `AzureKeyCredential` for Text Analytics
3889
+ * @internal
3890
+ */
3891
+ function textAnalyticsAzureKeyCredentialPolicy(credential) {
3892
+ return {
3893
+ name: textAnalyticsAzureKeyCredentialPolicyName,
3894
+ sendRequest(request, next) {
3895
+ request.headers.set(API_KEY_HEADER_NAME, credential.key);
3896
+ return next(request);
3897
+ },
3898
+ };
3899
+ }
3900
+
3901
+ // Copyright (c) Microsoft Corporation.
3902
+ /**
3903
+ * A client for interacting with the text analysis features in Azure Cognitive
3904
+ * Language Service.
3905
+ *
3906
+ * The client needs the endpoint of a Language resource and an authentication
3907
+ * method such as an API key or AAD. The API key and endpoint can be found in
3908
+ * the Language resource page in the Azure portal. They will be located in the
3909
+ * resource's Keys and Endpoint page, under Resource Management.
3910
+ *
3911
+ * ### Examples for authentication:
3912
+ *
3913
+ * #### API Key
3914
+ *
3915
+ * ```js
3916
+ * import { TextAnalysisClient, AzureKeyCredential } from "@azure/ai-language-text";
3917
+ *
3918
+ * const endpoint = "https://<resource name>.cognitiveservices.azure.com";
3919
+ * const credential = new AzureKeyCredential("<api key>");
3920
+ *
3921
+ * const client = new TextAnalysisClient(endpoint, credential);
3922
+ * ```
3923
+ *
3924
+ * #### Azure Active Directory
3925
+ *
3926
+ * See the [`@azure/identity`](https://npmjs.com/package/\@azure/identity)
3927
+ * package for more information about authenticating with Azure Active Directory.
3928
+ *
3929
+ * ```js
3930
+ * import { TextAnalysisClient } from "@azure/ai-language-text";
3931
+ * import { DefaultAzureCredential } from "@azure/identity";
3932
+ *
3933
+ * const endpoint = "https://<resource name>.cognitiveservices.azure.com";
3934
+ * const credential = new DefaultAzureCredential();
3935
+ *
3936
+ * const client = new TextAnalysisClient(endpoint, credential);
3937
+ * ```
3938
+ */
3939
+ class TextAnalysisClient {
3940
+ constructor(endpointUrl, credential, options = {}) {
3941
+ const { defaultCountryHint = "us", defaultLanguage = "en" } = options, pipelineOptions = tslib.__rest(options, ["defaultCountryHint", "defaultLanguage"]);
3942
+ this.defaultCountryHint = defaultCountryHint;
3943
+ this.defaultLanguage = defaultLanguage;
3944
+ const internalPipelineOptions = Object.assign(Object.assign({}, pipelineOptions), {
3945
+ loggingOptions: {
3946
+ logger: logger.info,
3947
+ additionalAllowedHeaderNames: ["x-ms-correlation-request-id", "x-ms-request-id"],
3948
+ },
3949
+ });
3950
+ this._client = new GeneratedClient(endpointUrl, internalPipelineOptions);
3951
+ const authPolicy = coreAuth.isTokenCredential(credential)
3952
+ ? coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: DEFAULT_COGNITIVE_SCOPE })
3953
+ : textAnalyticsAzureKeyCredentialPolicy(credential);
3954
+ this._client.pipeline.addPolicy(authPolicy);
3955
+ this._tracing = coreTracing.createTracingClient({
3956
+ packageName: "@azure/ai-language-text",
3957
+ packageVersion: SDK_VERSION,
3958
+ namespace: "Microsoft.CognitiveServices",
3959
+ });
3960
+ }
3961
+ // implementation
3962
+ async analyze(actionName, documents, languageOrCountryHintOrOptions, options) {
3963
+ let realOptions;
3964
+ if (documents.length === 0) {
3965
+ throw new Error("'documents' must be a non-empty array");
3966
+ }
3967
+ let realInputs;
3968
+ if (isStringArray(documents)) {
3969
+ if (actionName === "LanguageDetection") {
3970
+ realInputs = convertToLanguageDetectionInput(documents, typeof languageOrCountryHintOrOptions === "string"
3971
+ ? languageOrCountryHintOrOptions
3972
+ : this.defaultCountryHint);
3973
+ }
3974
+ else {
3975
+ realInputs = convertToTextDocumentInput(documents, typeof languageOrCountryHintOrOptions === "string"
3976
+ ? languageOrCountryHintOrOptions
3977
+ : this.defaultLanguage);
3978
+ }
3979
+ realOptions = options || {};
3980
+ }
3981
+ else {
3982
+ realInputs = documents;
3983
+ realOptions =
3984
+ languageOrCountryHintOrOptions || {};
3985
+ }
3986
+ const { options: operationOptions, rest: action } = getOperationOptions(realOptions);
3987
+ return this._tracing.withSpan("TextAnalysisClient.analyze", operationOptions, async (updatedOptions) => throwError(this._client
3988
+ .analyze({
3989
+ kind: actionName,
3990
+ analysisInput: {
3991
+ documents: realInputs,
3992
+ },
3993
+ parameters: action,
3994
+ }, updatedOptions)
3995
+ .then((result) => transformActionResult(actionName, realInputs, result))));
3996
+ }
3997
+ // implementation
3998
+ async beginAnalyzeBatch(actions, documents, languageOrOptions, options = {}) {
3999
+ let realOptions;
4000
+ let realInputs;
4001
+ if (!Array.isArray(documents) || documents.length === 0) {
4002
+ throw new Error("'documents' must be a non-empty array");
4003
+ }
4004
+ if (isStringArray(documents)) {
4005
+ const language = languageOrOptions || this.defaultLanguage;
4006
+ realInputs = convertToTextDocumentInput(documents, language);
4007
+ realOptions = options;
4008
+ }
4009
+ else {
4010
+ realInputs = documents;
4011
+ realOptions = languageOrOptions;
4012
+ }
4013
+ const realActions = actions.map((_a) => {
4014
+ var { kind, actionName } = _a, rest = tslib.__rest(_a, ["kind", "actionName"]);
4015
+ return ({
4016
+ kind,
4017
+ actionName,
4018
+ parameters: rest,
4019
+ });
4020
+ });
4021
+ const { includeStatistics, updateIntervalInMs, displayName } = realOptions, rest = tslib.__rest(realOptions, ["includeStatistics", "updateIntervalInMs", "displayName"]);
4022
+ const lro = createAnalyzeBatchLro({
4023
+ client: this._client,
4024
+ commonOptions: rest,
4025
+ documents: realInputs,
4026
+ initialRequestOptions: { displayName },
4027
+ pollRequestOptions: { includeStatistics },
4028
+ tasks: realActions,
4029
+ tracing: this._tracing,
4030
+ });
4031
+ const poller = new coreLro.LroEngine(lro, {
4032
+ intervalInMs: updateIntervalInMs,
4033
+ processResult: processAnalyzeResult({
4034
+ client: this._client,
4035
+ tracing: this._tracing,
4036
+ documents: realInputs,
4037
+ opOptions: Object.assign(Object.assign({}, rest), { includeStatistics }),
4038
+ }),
4039
+ updateState: createUpdateAnalyzeState(realInputs),
4040
+ cancel: createCancelOperation({
4041
+ client: this._client,
4042
+ tracing: this._tracing,
4043
+ options: rest,
4044
+ }),
4045
+ });
4046
+ await poller.poll();
4047
+ return poller;
4048
+ }
4049
+ // implementation
4050
+ async restoreAnalyzeBatchPoller(serializedState, options = {}) {
4051
+ const { includeStatistics, updateIntervalInMs } = options, rest = tslib.__rest(options, ["includeStatistics", "updateIntervalInMs"]);
4052
+ const documents = getDocsFromState(serializedState);
4053
+ const lro = createCreateAnalyzeBatchPollerLro({
4054
+ client: this._client,
4055
+ options: Object.assign(Object.assign({}, rest), { includeStatistics }),
4056
+ tracing: this._tracing,
4057
+ });
4058
+ const poller = new coreLro.LroEngine(lro, {
4059
+ intervalInMs: updateIntervalInMs,
4060
+ resumeFrom: serializedState,
4061
+ processResult: processAnalyzeResult({
4062
+ client: this._client,
4063
+ tracing: this._tracing,
4064
+ documents,
4065
+ opOptions: Object.assign(Object.assign({}, rest), { includeStatistics }),
4066
+ }),
4067
+ updateState: createUpdateAnalyzeState(),
4068
+ cancel: createCancelOperation({
4069
+ client: this._client,
4070
+ tracing: this._tracing,
4071
+ options: rest,
4072
+ }),
4073
+ });
4074
+ await poller.poll();
4075
+ return poller;
4076
+ }
4077
+ }
4078
+
4079
+ /*
4080
+ * Copyright (c) Microsoft Corporation.
4081
+ * Licensed under the MIT License.
4082
+ *
4083
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4084
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4085
+ */
4086
+ /** Known values of {@link AnalyzeTextTaskKind} that the service accepts. */
4087
+ var KnownAnalyzeTextTaskKind;
4088
+ (function (KnownAnalyzeTextTaskKind) {
4089
+ /** SentimentAnalysis */
4090
+ KnownAnalyzeTextTaskKind["SentimentAnalysis"] = "SentimentAnalysis";
4091
+ /** EntityRecognition */
4092
+ KnownAnalyzeTextTaskKind["EntityRecognition"] = "EntityRecognition";
4093
+ /** PiiEntityRecognition */
4094
+ KnownAnalyzeTextTaskKind["PiiEntityRecognition"] = "PiiEntityRecognition";
4095
+ /** KeyPhraseExtraction */
4096
+ KnownAnalyzeTextTaskKind["KeyPhraseExtraction"] = "KeyPhraseExtraction";
4097
+ /** LanguageDetection */
4098
+ KnownAnalyzeTextTaskKind["LanguageDetection"] = "LanguageDetection";
4099
+ /** EntityLinking */
4100
+ KnownAnalyzeTextTaskKind["EntityLinking"] = "EntityLinking";
4101
+ })(KnownAnalyzeTextTaskKind || (KnownAnalyzeTextTaskKind = {}));
4102
+ /** Known values of {@link AnalyzeTextTaskResultsKind} that the service accepts. */
4103
+ var KnownAnalyzeTextTaskResultsKind;
4104
+ (function (KnownAnalyzeTextTaskResultsKind) {
4105
+ /** SentimentAnalysisResults */
4106
+ KnownAnalyzeTextTaskResultsKind["SentimentAnalysisResults"] = "SentimentAnalysisResults";
4107
+ /** EntityRecognitionResults */
4108
+ KnownAnalyzeTextTaskResultsKind["EntityRecognitionResults"] = "EntityRecognitionResults";
4109
+ /** PiiEntityRecognitionResults */
4110
+ KnownAnalyzeTextTaskResultsKind["PiiEntityRecognitionResults"] = "PiiEntityRecognitionResults";
4111
+ /** KeyPhraseExtractionResults */
4112
+ KnownAnalyzeTextTaskResultsKind["KeyPhraseExtractionResults"] = "KeyPhraseExtractionResults";
4113
+ /** LanguageDetectionResults */
4114
+ KnownAnalyzeTextTaskResultsKind["LanguageDetectionResults"] = "LanguageDetectionResults";
4115
+ /** EntityLinkingResults */
4116
+ KnownAnalyzeTextTaskResultsKind["EntityLinkingResults"] = "EntityLinkingResults";
4117
+ })(KnownAnalyzeTextTaskResultsKind || (KnownAnalyzeTextTaskResultsKind = {}));
4118
+ /** Known values of {@link ErrorCode} that the service accepts. */
4119
+ exports.KnownErrorCode = void 0;
4120
+ (function (KnownErrorCode) {
4121
+ /** InvalidRequest */
4122
+ KnownErrorCode["InvalidRequest"] = "InvalidRequest";
4123
+ /** InvalidArgument */
4124
+ KnownErrorCode["InvalidArgument"] = "InvalidArgument";
4125
+ /** Unauthorized */
4126
+ KnownErrorCode["Unauthorized"] = "Unauthorized";
4127
+ /** Forbidden */
4128
+ KnownErrorCode["Forbidden"] = "Forbidden";
4129
+ /** NotFound */
4130
+ KnownErrorCode["NotFound"] = "NotFound";
4131
+ /** ProjectNotFound */
4132
+ KnownErrorCode["ProjectNotFound"] = "ProjectNotFound";
4133
+ /** OperationNotFound */
4134
+ KnownErrorCode["OperationNotFound"] = "OperationNotFound";
4135
+ /** AzureCognitiveSearchNotFound */
4136
+ KnownErrorCode["AzureCognitiveSearchNotFound"] = "AzureCognitiveSearchNotFound";
4137
+ /** AzureCognitiveSearchIndexNotFound */
4138
+ KnownErrorCode["AzureCognitiveSearchIndexNotFound"] = "AzureCognitiveSearchIndexNotFound";
4139
+ /** TooManyRequests */
4140
+ KnownErrorCode["TooManyRequests"] = "TooManyRequests";
4141
+ /** AzureCognitiveSearchThrottling */
4142
+ KnownErrorCode["AzureCognitiveSearchThrottling"] = "AzureCognitiveSearchThrottling";
4143
+ /** AzureCognitiveSearchIndexLimitReached */
4144
+ KnownErrorCode["AzureCognitiveSearchIndexLimitReached"] = "AzureCognitiveSearchIndexLimitReached";
4145
+ /** InternalServerError */
4146
+ KnownErrorCode["InternalServerError"] = "InternalServerError";
4147
+ /** ServiceUnavailable */
4148
+ KnownErrorCode["ServiceUnavailable"] = "ServiceUnavailable";
4149
+ })(exports.KnownErrorCode || (exports.KnownErrorCode = {}));
4150
+ /** Known values of {@link InnerErrorCode} that the service accepts. */
4151
+ exports.KnownInnerErrorCode = void 0;
4152
+ (function (KnownInnerErrorCode) {
4153
+ /** InvalidRequest */
4154
+ KnownInnerErrorCode["InvalidRequest"] = "InvalidRequest";
4155
+ /** InvalidParameterValue */
4156
+ KnownInnerErrorCode["InvalidParameterValue"] = "InvalidParameterValue";
4157
+ /** KnowledgeBaseNotFound */
4158
+ KnownInnerErrorCode["KnowledgeBaseNotFound"] = "KnowledgeBaseNotFound";
4159
+ /** AzureCognitiveSearchNotFound */
4160
+ KnownInnerErrorCode["AzureCognitiveSearchNotFound"] = "AzureCognitiveSearchNotFound";
4161
+ /** AzureCognitiveSearchThrottling */
4162
+ KnownInnerErrorCode["AzureCognitiveSearchThrottling"] = "AzureCognitiveSearchThrottling";
4163
+ /** ExtractionFailure */
4164
+ KnownInnerErrorCode["ExtractionFailure"] = "ExtractionFailure";
4165
+ /** InvalidRequestBodyFormat */
4166
+ KnownInnerErrorCode["InvalidRequestBodyFormat"] = "InvalidRequestBodyFormat";
4167
+ /** EmptyRequest */
4168
+ KnownInnerErrorCode["EmptyRequest"] = "EmptyRequest";
4169
+ /** MissingInputDocuments */
4170
+ KnownInnerErrorCode["MissingInputDocuments"] = "MissingInputDocuments";
4171
+ /** InvalidDocument */
4172
+ KnownInnerErrorCode["InvalidDocument"] = "InvalidDocument";
4173
+ /** ModelVersionIncorrect */
4174
+ KnownInnerErrorCode["ModelVersionIncorrect"] = "ModelVersionIncorrect";
4175
+ /** InvalidDocumentBatch */
4176
+ KnownInnerErrorCode["InvalidDocumentBatch"] = "InvalidDocumentBatch";
4177
+ /** UnsupportedLanguageCode */
4178
+ KnownInnerErrorCode["UnsupportedLanguageCode"] = "UnsupportedLanguageCode";
4179
+ /** InvalidCountryHint */
4180
+ KnownInnerErrorCode["InvalidCountryHint"] = "InvalidCountryHint";
4181
+ })(exports.KnownInnerErrorCode || (exports.KnownInnerErrorCode = {}));
4182
+ /** Known values of {@link AnalyzeTextLROTaskKind} that the service accepts. */
4183
+ var KnownAnalyzeTextLROTaskKind;
4184
+ (function (KnownAnalyzeTextLROTaskKind) {
4185
+ /** SentimentAnalysis */
4186
+ KnownAnalyzeTextLROTaskKind["SentimentAnalysis"] = "SentimentAnalysis";
4187
+ /** EntityRecognition */
4188
+ KnownAnalyzeTextLROTaskKind["EntityRecognition"] = "EntityRecognition";
4189
+ /** PiiEntityRecognition */
4190
+ KnownAnalyzeTextLROTaskKind["PiiEntityRecognition"] = "PiiEntityRecognition";
4191
+ /** KeyPhraseExtraction */
4192
+ KnownAnalyzeTextLROTaskKind["KeyPhraseExtraction"] = "KeyPhraseExtraction";
4193
+ /** EntityLinking */
4194
+ KnownAnalyzeTextLROTaskKind["EntityLinking"] = "EntityLinking";
4195
+ /** Healthcare */
4196
+ KnownAnalyzeTextLROTaskKind["Healthcare"] = "Healthcare";
4197
+ /** ExtractiveSummarization */
4198
+ KnownAnalyzeTextLROTaskKind["ExtractiveSummarization"] = "ExtractiveSummarization";
4199
+ /** CustomEntityRecognition */
4200
+ KnownAnalyzeTextLROTaskKind["CustomEntityRecognition"] = "CustomEntityRecognition";
4201
+ /** CustomSingleLabelClassification */
4202
+ KnownAnalyzeTextLROTaskKind["CustomSingleLabelClassification"] = "CustomSingleLabelClassification";
4203
+ /** CustomMultiLabelClassification */
4204
+ KnownAnalyzeTextLROTaskKind["CustomMultiLabelClassification"] = "CustomMultiLabelClassification";
4205
+ })(KnownAnalyzeTextLROTaskKind || (KnownAnalyzeTextLROTaskKind = {}));
4206
+ /** Known values of {@link AnalyzeTextLROResultsKind} that the service accepts. */
4207
+ var KnownAnalyzeTextLROResultsKind;
4208
+ (function (KnownAnalyzeTextLROResultsKind) {
4209
+ /** SentimentAnalysisLROResults */
4210
+ KnownAnalyzeTextLROResultsKind["SentimentAnalysisLROResults"] = "SentimentAnalysisLROResults";
4211
+ /** EntityRecognitionLROResults */
4212
+ KnownAnalyzeTextLROResultsKind["EntityRecognitionLROResults"] = "EntityRecognitionLROResults";
4213
+ /** PiiEntityRecognitionLROResults */
4214
+ KnownAnalyzeTextLROResultsKind["PiiEntityRecognitionLROResults"] = "PiiEntityRecognitionLROResults";
4215
+ /** KeyPhraseExtractionLROResults */
4216
+ KnownAnalyzeTextLROResultsKind["KeyPhraseExtractionLROResults"] = "KeyPhraseExtractionLROResults";
4217
+ /** EntityLinkingLROResults */
4218
+ KnownAnalyzeTextLROResultsKind["EntityLinkingLROResults"] = "EntityLinkingLROResults";
4219
+ /** HealthcareLROResults */
4220
+ KnownAnalyzeTextLROResultsKind["HealthcareLROResults"] = "HealthcareLROResults";
4221
+ /** ExtractiveSummarizationLROResults */
4222
+ KnownAnalyzeTextLROResultsKind["ExtractiveSummarizationLROResults"] = "ExtractiveSummarizationLROResults";
4223
+ /** CustomEntityRecognitionLROResults */
4224
+ KnownAnalyzeTextLROResultsKind["CustomEntityRecognitionLROResults"] = "CustomEntityRecognitionLROResults";
4225
+ /** CustomSingleLabelClassificationLROResults */
4226
+ KnownAnalyzeTextLROResultsKind["CustomSingleLabelClassificationLROResults"] = "CustomSingleLabelClassificationLROResults";
4227
+ /** CustomMultiLabelClassificationLROResults */
4228
+ KnownAnalyzeTextLROResultsKind["CustomMultiLabelClassificationLROResults"] = "CustomMultiLabelClassificationLROResults";
4229
+ })(KnownAnalyzeTextLROResultsKind || (KnownAnalyzeTextLROResultsKind = {}));
4230
+ /** Known values of {@link StringIndexType} that the service accepts. */
4231
+ exports.KnownStringIndexType = void 0;
4232
+ (function (KnownStringIndexType) {
4233
+ /** Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. */
4234
+ KnownStringIndexType["TextElementsV8"] = "TextElements_v8";
4235
+ /** Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. */
4236
+ KnownStringIndexType["UnicodeCodePoint"] = "UnicodeCodePoint";
4237
+ /** Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript. */
4238
+ KnownStringIndexType["Utf16CodeUnit"] = "Utf16CodeUnit";
4239
+ })(exports.KnownStringIndexType || (exports.KnownStringIndexType = {}));
4240
+ /** Known values of {@link PiiEntityDomain} that the service accepts. */
4241
+ exports.KnownPiiEntityDomain = void 0;
4242
+ (function (KnownPiiEntityDomain) {
4243
+ /** Indicates that entities in the Personal Health Information domain should be redacted. */
4244
+ KnownPiiEntityDomain["Phi"] = "phi";
4245
+ /** Indicates that no domain is specified. */
4246
+ KnownPiiEntityDomain["None"] = "none";
4247
+ })(exports.KnownPiiEntityDomain || (exports.KnownPiiEntityDomain = {}));
4248
+ /** Known values of {@link PiiEntityCategory} that the service accepts. */
4249
+ exports.KnownPiiEntityCategory = void 0;
4250
+ (function (KnownPiiEntityCategory) {
4251
+ /** ABARoutingNumber */
4252
+ KnownPiiEntityCategory["ABARoutingNumber"] = "ABARoutingNumber";
4253
+ /** ARNationalIdentityNumber */
4254
+ KnownPiiEntityCategory["ARNationalIdentityNumber"] = "ARNationalIdentityNumber";
4255
+ /** AUBankAccountNumber */
4256
+ KnownPiiEntityCategory["AUBankAccountNumber"] = "AUBankAccountNumber";
4257
+ /** AUDriversLicenseNumber */
4258
+ KnownPiiEntityCategory["AUDriversLicenseNumber"] = "AUDriversLicenseNumber";
4259
+ /** AUMedicalAccountNumber */
4260
+ KnownPiiEntityCategory["AUMedicalAccountNumber"] = "AUMedicalAccountNumber";
4261
+ /** AUPassportNumber */
4262
+ KnownPiiEntityCategory["AUPassportNumber"] = "AUPassportNumber";
4263
+ /** AUTaxFileNumber */
4264
+ KnownPiiEntityCategory["AUTaxFileNumber"] = "AUTaxFileNumber";
4265
+ /** AUBusinessNumber */
4266
+ KnownPiiEntityCategory["AUBusinessNumber"] = "AUBusinessNumber";
4267
+ /** AUCompanyNumber */
4268
+ KnownPiiEntityCategory["AUCompanyNumber"] = "AUCompanyNumber";
4269
+ /** ATIdentityCard */
4270
+ KnownPiiEntityCategory["ATIdentityCard"] = "ATIdentityCard";
4271
+ /** ATTaxIdentificationNumber */
4272
+ KnownPiiEntityCategory["ATTaxIdentificationNumber"] = "ATTaxIdentificationNumber";
4273
+ /** ATValueAddedTaxNumber */
4274
+ KnownPiiEntityCategory["ATValueAddedTaxNumber"] = "ATValueAddedTaxNumber";
4275
+ /** AzureDocumentDBAuthKey */
4276
+ KnownPiiEntityCategory["AzureDocumentDBAuthKey"] = "AzureDocumentDBAuthKey";
4277
+ /** AzureIaasDatabaseConnectionAndSQLString */
4278
+ KnownPiiEntityCategory["AzureIaasDatabaseConnectionAndSQLString"] = "AzureIAASDatabaseConnectionAndSQLString";
4279
+ /** AzureIoTConnectionString */
4280
+ KnownPiiEntityCategory["AzureIoTConnectionString"] = "AzureIoTConnectionString";
4281
+ /** AzurePublishSettingPassword */
4282
+ KnownPiiEntityCategory["AzurePublishSettingPassword"] = "AzurePublishSettingPassword";
4283
+ /** AzureRedisCacheString */
4284
+ KnownPiiEntityCategory["AzureRedisCacheString"] = "AzureRedisCacheString";
4285
+ /** AzureSAS */
4286
+ KnownPiiEntityCategory["AzureSAS"] = "AzureSAS";
4287
+ /** AzureServiceBusString */
4288
+ KnownPiiEntityCategory["AzureServiceBusString"] = "AzureServiceBusString";
4289
+ /** AzureStorageAccountKey */
4290
+ KnownPiiEntityCategory["AzureStorageAccountKey"] = "AzureStorageAccountKey";
4291
+ /** AzureStorageAccountGeneric */
4292
+ KnownPiiEntityCategory["AzureStorageAccountGeneric"] = "AzureStorageAccountGeneric";
4293
+ /** BENationalNumber */
4294
+ KnownPiiEntityCategory["BENationalNumber"] = "BENationalNumber";
4295
+ /** BENationalNumberV2 */
4296
+ KnownPiiEntityCategory["BENationalNumberV2"] = "BENationalNumberV2";
4297
+ /** BEValueAddedTaxNumber */
4298
+ KnownPiiEntityCategory["BEValueAddedTaxNumber"] = "BEValueAddedTaxNumber";
4299
+ /** BrcpfNumber */
4300
+ KnownPiiEntityCategory["BrcpfNumber"] = "BRCPFNumber";
4301
+ /** BRLegalEntityNumber */
4302
+ KnownPiiEntityCategory["BRLegalEntityNumber"] = "BRLegalEntityNumber";
4303
+ /** BRNationalIdrg */
4304
+ KnownPiiEntityCategory["BRNationalIdrg"] = "BRNationalIDRG";
4305
+ /** BGUniformCivilNumber */
4306
+ KnownPiiEntityCategory["BGUniformCivilNumber"] = "BGUniformCivilNumber";
4307
+ /** CABankAccountNumber */
4308
+ KnownPiiEntityCategory["CABankAccountNumber"] = "CABankAccountNumber";
4309
+ /** CADriversLicenseNumber */
4310
+ KnownPiiEntityCategory["CADriversLicenseNumber"] = "CADriversLicenseNumber";
4311
+ /** CAHealthServiceNumber */
4312
+ KnownPiiEntityCategory["CAHealthServiceNumber"] = "CAHealthServiceNumber";
4313
+ /** CAPassportNumber */
4314
+ KnownPiiEntityCategory["CAPassportNumber"] = "CAPassportNumber";
4315
+ /** CAPersonalHealthIdentification */
4316
+ KnownPiiEntityCategory["CAPersonalHealthIdentification"] = "CAPersonalHealthIdentification";
4317
+ /** CASocialInsuranceNumber */
4318
+ KnownPiiEntityCategory["CASocialInsuranceNumber"] = "CASocialInsuranceNumber";
4319
+ /** CLIdentityCardNumber */
4320
+ KnownPiiEntityCategory["CLIdentityCardNumber"] = "CLIdentityCardNumber";
4321
+ /** CNResidentIdentityCardNumber */
4322
+ KnownPiiEntityCategory["CNResidentIdentityCardNumber"] = "CNResidentIdentityCardNumber";
4323
+ /** CreditCardNumber */
4324
+ KnownPiiEntityCategory["CreditCardNumber"] = "CreditCardNumber";
4325
+ /** HRIdentityCardNumber */
4326
+ KnownPiiEntityCategory["HRIdentityCardNumber"] = "HRIdentityCardNumber";
4327
+ /** HRNationalIDNumber */
4328
+ KnownPiiEntityCategory["HRNationalIDNumber"] = "HRNationalIDNumber";
4329
+ /** HRPersonalIdentificationNumber */
4330
+ KnownPiiEntityCategory["HRPersonalIdentificationNumber"] = "HRPersonalIdentificationNumber";
4331
+ /** HRPersonalIdentificationOIBNumberV2 */
4332
+ KnownPiiEntityCategory["HRPersonalIdentificationOIBNumberV2"] = "HRPersonalIdentificationOIBNumberV2";
4333
+ /** CYIdentityCard */
4334
+ KnownPiiEntityCategory["CYIdentityCard"] = "CYIdentityCard";
4335
+ /** CYTaxIdentificationNumber */
4336
+ KnownPiiEntityCategory["CYTaxIdentificationNumber"] = "CYTaxIdentificationNumber";
4337
+ /** CZPersonalIdentityNumber */
4338
+ KnownPiiEntityCategory["CZPersonalIdentityNumber"] = "CZPersonalIdentityNumber";
4339
+ /** CZPersonalIdentityV2 */
4340
+ KnownPiiEntityCategory["CZPersonalIdentityV2"] = "CZPersonalIdentityV2";
4341
+ /** DKPersonalIdentificationNumber */
4342
+ KnownPiiEntityCategory["DKPersonalIdentificationNumber"] = "DKPersonalIdentificationNumber";
4343
+ /** DKPersonalIdentificationV2 */
4344
+ KnownPiiEntityCategory["DKPersonalIdentificationV2"] = "DKPersonalIdentificationV2";
4345
+ /** DrugEnforcementAgencyNumber */
4346
+ KnownPiiEntityCategory["DrugEnforcementAgencyNumber"] = "DrugEnforcementAgencyNumber";
4347
+ /** EEPersonalIdentificationCode */
4348
+ KnownPiiEntityCategory["EEPersonalIdentificationCode"] = "EEPersonalIdentificationCode";
4349
+ /** EUDebitCardNumber */
4350
+ KnownPiiEntityCategory["EUDebitCardNumber"] = "EUDebitCardNumber";
4351
+ /** EUDriversLicenseNumber */
4352
+ KnownPiiEntityCategory["EUDriversLicenseNumber"] = "EUDriversLicenseNumber";
4353
+ /** EugpsCoordinates */
4354
+ KnownPiiEntityCategory["EugpsCoordinates"] = "EUGPSCoordinates";
4355
+ /** EUNationalIdentificationNumber */
4356
+ KnownPiiEntityCategory["EUNationalIdentificationNumber"] = "EUNationalIdentificationNumber";
4357
+ /** EUPassportNumber */
4358
+ KnownPiiEntityCategory["EUPassportNumber"] = "EUPassportNumber";
4359
+ /** EUSocialSecurityNumber */
4360
+ KnownPiiEntityCategory["EUSocialSecurityNumber"] = "EUSocialSecurityNumber";
4361
+ /** EUTaxIdentificationNumber */
4362
+ KnownPiiEntityCategory["EUTaxIdentificationNumber"] = "EUTaxIdentificationNumber";
4363
+ /** FIEuropeanHealthNumber */
4364
+ KnownPiiEntityCategory["FIEuropeanHealthNumber"] = "FIEuropeanHealthNumber";
4365
+ /** FINationalID */
4366
+ KnownPiiEntityCategory["FINationalID"] = "FINationalID";
4367
+ /** FINationalIDV2 */
4368
+ KnownPiiEntityCategory["FINationalIDV2"] = "FINationalIDV2";
4369
+ /** FIPassportNumber */
4370
+ KnownPiiEntityCategory["FIPassportNumber"] = "FIPassportNumber";
4371
+ /** FRDriversLicenseNumber */
4372
+ KnownPiiEntityCategory["FRDriversLicenseNumber"] = "FRDriversLicenseNumber";
4373
+ /** FRHealthInsuranceNumber */
4374
+ KnownPiiEntityCategory["FRHealthInsuranceNumber"] = "FRHealthInsuranceNumber";
4375
+ /** FRNationalID */
4376
+ KnownPiiEntityCategory["FRNationalID"] = "FRNationalID";
4377
+ /** FRPassportNumber */
4378
+ KnownPiiEntityCategory["FRPassportNumber"] = "FRPassportNumber";
4379
+ /** FRSocialSecurityNumber */
4380
+ KnownPiiEntityCategory["FRSocialSecurityNumber"] = "FRSocialSecurityNumber";
4381
+ /** FRTaxIdentificationNumber */
4382
+ KnownPiiEntityCategory["FRTaxIdentificationNumber"] = "FRTaxIdentificationNumber";
4383
+ /** FRValueAddedTaxNumber */
4384
+ KnownPiiEntityCategory["FRValueAddedTaxNumber"] = "FRValueAddedTaxNumber";
4385
+ /** DEDriversLicenseNumber */
4386
+ KnownPiiEntityCategory["DEDriversLicenseNumber"] = "DEDriversLicenseNumber";
4387
+ /** DEPassportNumber */
4388
+ KnownPiiEntityCategory["DEPassportNumber"] = "DEPassportNumber";
4389
+ /** DEIdentityCardNumber */
4390
+ KnownPiiEntityCategory["DEIdentityCardNumber"] = "DEIdentityCardNumber";
4391
+ /** DETaxIdentificationNumber */
4392
+ KnownPiiEntityCategory["DETaxIdentificationNumber"] = "DETaxIdentificationNumber";
4393
+ /** DEValueAddedNumber */
4394
+ KnownPiiEntityCategory["DEValueAddedNumber"] = "DEValueAddedNumber";
4395
+ /** GRNationalIDCard */
4396
+ KnownPiiEntityCategory["GRNationalIDCard"] = "GRNationalIDCard";
4397
+ /** GRNationalIDV2 */
4398
+ KnownPiiEntityCategory["GRNationalIDV2"] = "GRNationalIDV2";
4399
+ /** GRTaxIdentificationNumber */
4400
+ KnownPiiEntityCategory["GRTaxIdentificationNumber"] = "GRTaxIdentificationNumber";
4401
+ /** HKIdentityCardNumber */
4402
+ KnownPiiEntityCategory["HKIdentityCardNumber"] = "HKIdentityCardNumber";
4403
+ /** HUValueAddedNumber */
4404
+ KnownPiiEntityCategory["HUValueAddedNumber"] = "HUValueAddedNumber";
4405
+ /** HUPersonalIdentificationNumber */
4406
+ KnownPiiEntityCategory["HUPersonalIdentificationNumber"] = "HUPersonalIdentificationNumber";
4407
+ /** HUTaxIdentificationNumber */
4408
+ KnownPiiEntityCategory["HUTaxIdentificationNumber"] = "HUTaxIdentificationNumber";
4409
+ /** INPermanentAccount */
4410
+ KnownPiiEntityCategory["INPermanentAccount"] = "INPermanentAccount";
4411
+ /** INUniqueIdentificationNumber */
4412
+ KnownPiiEntityCategory["INUniqueIdentificationNumber"] = "INUniqueIdentificationNumber";
4413
+ /** IDIdentityCardNumber */
4414
+ KnownPiiEntityCategory["IDIdentityCardNumber"] = "IDIdentityCardNumber";
4415
+ /** InternationalBankingAccountNumber */
4416
+ KnownPiiEntityCategory["InternationalBankingAccountNumber"] = "InternationalBankingAccountNumber";
4417
+ /** IEPersonalPublicServiceNumber */
4418
+ KnownPiiEntityCategory["IEPersonalPublicServiceNumber"] = "IEPersonalPublicServiceNumber";
4419
+ /** IEPersonalPublicServiceNumberV2 */
4420
+ KnownPiiEntityCategory["IEPersonalPublicServiceNumberV2"] = "IEPersonalPublicServiceNumberV2";
4421
+ /** ILBankAccountNumber */
4422
+ KnownPiiEntityCategory["ILBankAccountNumber"] = "ILBankAccountNumber";
4423
+ /** ILNationalID */
4424
+ KnownPiiEntityCategory["ILNationalID"] = "ILNationalID";
4425
+ /** ITDriversLicenseNumber */
4426
+ KnownPiiEntityCategory["ITDriversLicenseNumber"] = "ITDriversLicenseNumber";
4427
+ /** ITFiscalCode */
4428
+ KnownPiiEntityCategory["ITFiscalCode"] = "ITFiscalCode";
4429
+ /** ITValueAddedTaxNumber */
4430
+ KnownPiiEntityCategory["ITValueAddedTaxNumber"] = "ITValueAddedTaxNumber";
4431
+ /** JPBankAccountNumber */
4432
+ KnownPiiEntityCategory["JPBankAccountNumber"] = "JPBankAccountNumber";
4433
+ /** JPDriversLicenseNumber */
4434
+ KnownPiiEntityCategory["JPDriversLicenseNumber"] = "JPDriversLicenseNumber";
4435
+ /** JPPassportNumber */
4436
+ KnownPiiEntityCategory["JPPassportNumber"] = "JPPassportNumber";
4437
+ /** JPResidentRegistrationNumber */
4438
+ KnownPiiEntityCategory["JPResidentRegistrationNumber"] = "JPResidentRegistrationNumber";
4439
+ /** JPSocialInsuranceNumber */
4440
+ KnownPiiEntityCategory["JPSocialInsuranceNumber"] = "JPSocialInsuranceNumber";
4441
+ /** JPMyNumberCorporate */
4442
+ KnownPiiEntityCategory["JPMyNumberCorporate"] = "JPMyNumberCorporate";
4443
+ /** JPMyNumberPersonal */
4444
+ KnownPiiEntityCategory["JPMyNumberPersonal"] = "JPMyNumberPersonal";
4445
+ /** JPResidenceCardNumber */
4446
+ KnownPiiEntityCategory["JPResidenceCardNumber"] = "JPResidenceCardNumber";
4447
+ /** LVPersonalCode */
4448
+ KnownPiiEntityCategory["LVPersonalCode"] = "LVPersonalCode";
4449
+ /** LTPersonalCode */
4450
+ KnownPiiEntityCategory["LTPersonalCode"] = "LTPersonalCode";
4451
+ /** LUNationalIdentificationNumberNatural */
4452
+ KnownPiiEntityCategory["LUNationalIdentificationNumberNatural"] = "LUNationalIdentificationNumberNatural";
4453
+ /** LUNationalIdentificationNumberNonNatural */
4454
+ KnownPiiEntityCategory["LUNationalIdentificationNumberNonNatural"] = "LUNationalIdentificationNumberNonNatural";
4455
+ /** MYIdentityCardNumber */
4456
+ KnownPiiEntityCategory["MYIdentityCardNumber"] = "MYIdentityCardNumber";
4457
+ /** MTIdentityCardNumber */
4458
+ KnownPiiEntityCategory["MTIdentityCardNumber"] = "MTIdentityCardNumber";
4459
+ /** MTTaxIDNumber */
4460
+ KnownPiiEntityCategory["MTTaxIDNumber"] = "MTTaxIDNumber";
4461
+ /** NLCitizensServiceNumber */
4462
+ KnownPiiEntityCategory["NLCitizensServiceNumber"] = "NLCitizensServiceNumber";
4463
+ /** NLCitizensServiceNumberV2 */
4464
+ KnownPiiEntityCategory["NLCitizensServiceNumberV2"] = "NLCitizensServiceNumberV2";
4465
+ /** NLTaxIdentificationNumber */
4466
+ KnownPiiEntityCategory["NLTaxIdentificationNumber"] = "NLTaxIdentificationNumber";
4467
+ /** NLValueAddedTaxNumber */
4468
+ KnownPiiEntityCategory["NLValueAddedTaxNumber"] = "NLValueAddedTaxNumber";
4469
+ /** NZBankAccountNumber */
4470
+ KnownPiiEntityCategory["NZBankAccountNumber"] = "NZBankAccountNumber";
4471
+ /** NZDriversLicenseNumber */
4472
+ KnownPiiEntityCategory["NZDriversLicenseNumber"] = "NZDriversLicenseNumber";
4473
+ /** NZInlandRevenueNumber */
4474
+ KnownPiiEntityCategory["NZInlandRevenueNumber"] = "NZInlandRevenueNumber";
4475
+ /** NZMinistryOfHealthNumber */
4476
+ KnownPiiEntityCategory["NZMinistryOfHealthNumber"] = "NZMinistryOfHealthNumber";
4477
+ /** NZSocialWelfareNumber */
4478
+ KnownPiiEntityCategory["NZSocialWelfareNumber"] = "NZSocialWelfareNumber";
4479
+ /** NOIdentityNumber */
4480
+ KnownPiiEntityCategory["NOIdentityNumber"] = "NOIdentityNumber";
4481
+ /** PHUnifiedMultiPurposeIDNumber */
4482
+ KnownPiiEntityCategory["PHUnifiedMultiPurposeIDNumber"] = "PHUnifiedMultiPurposeIDNumber";
4483
+ /** PLIdentityCard */
4484
+ KnownPiiEntityCategory["PLIdentityCard"] = "PLIdentityCard";
4485
+ /** PLNationalID */
4486
+ KnownPiiEntityCategory["PLNationalID"] = "PLNationalID";
4487
+ /** PLNationalIDV2 */
4488
+ KnownPiiEntityCategory["PLNationalIDV2"] = "PLNationalIDV2";
4489
+ /** PLPassportNumber */
4490
+ KnownPiiEntityCategory["PLPassportNumber"] = "PLPassportNumber";
4491
+ /** PLTaxIdentificationNumber */
4492
+ KnownPiiEntityCategory["PLTaxIdentificationNumber"] = "PLTaxIdentificationNumber";
4493
+ /** PlregonNumber */
4494
+ KnownPiiEntityCategory["PlregonNumber"] = "PLREGONNumber";
4495
+ /** PTCitizenCardNumber */
4496
+ KnownPiiEntityCategory["PTCitizenCardNumber"] = "PTCitizenCardNumber";
4497
+ /** PTCitizenCardNumberV2 */
4498
+ KnownPiiEntityCategory["PTCitizenCardNumberV2"] = "PTCitizenCardNumberV2";
4499
+ /** PTTaxIdentificationNumber */
4500
+ KnownPiiEntityCategory["PTTaxIdentificationNumber"] = "PTTaxIdentificationNumber";
4501
+ /** ROPersonalNumericalCode */
4502
+ KnownPiiEntityCategory["ROPersonalNumericalCode"] = "ROPersonalNumericalCode";
4503
+ /** RUPassportNumberDomestic */
4504
+ KnownPiiEntityCategory["RUPassportNumberDomestic"] = "RUPassportNumberDomestic";
4505
+ /** RUPassportNumberInternational */
4506
+ KnownPiiEntityCategory["RUPassportNumberInternational"] = "RUPassportNumberInternational";
4507
+ /** SANationalID */
4508
+ KnownPiiEntityCategory["SANationalID"] = "SANationalID";
4509
+ /** SGNationalRegistrationIdentityCardNumber */
4510
+ KnownPiiEntityCategory["SGNationalRegistrationIdentityCardNumber"] = "SGNationalRegistrationIdentityCardNumber";
4511
+ /** SKPersonalNumber */
4512
+ KnownPiiEntityCategory["SKPersonalNumber"] = "SKPersonalNumber";
4513
+ /** SITaxIdentificationNumber */
4514
+ KnownPiiEntityCategory["SITaxIdentificationNumber"] = "SITaxIdentificationNumber";
4515
+ /** SIUniqueMasterCitizenNumber */
4516
+ KnownPiiEntityCategory["SIUniqueMasterCitizenNumber"] = "SIUniqueMasterCitizenNumber";
4517
+ /** ZAIdentificationNumber */
4518
+ KnownPiiEntityCategory["ZAIdentificationNumber"] = "ZAIdentificationNumber";
4519
+ /** KRResidentRegistrationNumber */
4520
+ KnownPiiEntityCategory["KRResidentRegistrationNumber"] = "KRResidentRegistrationNumber";
4521
+ /** Esdni */
4522
+ KnownPiiEntityCategory["Esdni"] = "ESDNI";
4523
+ /** ESSocialSecurityNumber */
4524
+ KnownPiiEntityCategory["ESSocialSecurityNumber"] = "ESSocialSecurityNumber";
4525
+ /** ESTaxIdentificationNumber */
4526
+ KnownPiiEntityCategory["ESTaxIdentificationNumber"] = "ESTaxIdentificationNumber";
4527
+ /** SQLServerConnectionString */
4528
+ KnownPiiEntityCategory["SQLServerConnectionString"] = "SQLServerConnectionString";
4529
+ /** SENationalID */
4530
+ KnownPiiEntityCategory["SENationalID"] = "SENationalID";
4531
+ /** SENationalIDV2 */
4532
+ KnownPiiEntityCategory["SENationalIDV2"] = "SENationalIDV2";
4533
+ /** SEPassportNumber */
4534
+ KnownPiiEntityCategory["SEPassportNumber"] = "SEPassportNumber";
4535
+ /** SETaxIdentificationNumber */
4536
+ KnownPiiEntityCategory["SETaxIdentificationNumber"] = "SETaxIdentificationNumber";
4537
+ /** SwiftCode */
4538
+ KnownPiiEntityCategory["SwiftCode"] = "SWIFTCode";
4539
+ /** CHSocialSecurityNumber */
4540
+ KnownPiiEntityCategory["CHSocialSecurityNumber"] = "CHSocialSecurityNumber";
4541
+ /** TWNationalID */
4542
+ KnownPiiEntityCategory["TWNationalID"] = "TWNationalID";
4543
+ /** TWPassportNumber */
4544
+ KnownPiiEntityCategory["TWPassportNumber"] = "TWPassportNumber";
4545
+ /** TWResidentCertificate */
4546
+ KnownPiiEntityCategory["TWResidentCertificate"] = "TWResidentCertificate";
4547
+ /** THPopulationIdentificationCode */
4548
+ KnownPiiEntityCategory["THPopulationIdentificationCode"] = "THPopulationIdentificationCode";
4549
+ /** TRNationalIdentificationNumber */
4550
+ KnownPiiEntityCategory["TRNationalIdentificationNumber"] = "TRNationalIdentificationNumber";
4551
+ /** UKDriversLicenseNumber */
4552
+ KnownPiiEntityCategory["UKDriversLicenseNumber"] = "UKDriversLicenseNumber";
4553
+ /** UKElectoralRollNumber */
4554
+ KnownPiiEntityCategory["UKElectoralRollNumber"] = "UKElectoralRollNumber";
4555
+ /** UKNationalHealthNumber */
4556
+ KnownPiiEntityCategory["UKNationalHealthNumber"] = "UKNationalHealthNumber";
4557
+ /** UKNationalInsuranceNumber */
4558
+ KnownPiiEntityCategory["UKNationalInsuranceNumber"] = "UKNationalInsuranceNumber";
4559
+ /** UKUniqueTaxpayerNumber */
4560
+ KnownPiiEntityCategory["UKUniqueTaxpayerNumber"] = "UKUniqueTaxpayerNumber";
4561
+ /** UsukPassportNumber */
4562
+ KnownPiiEntityCategory["UsukPassportNumber"] = "USUKPassportNumber";
4563
+ /** USBankAccountNumber */
4564
+ KnownPiiEntityCategory["USBankAccountNumber"] = "USBankAccountNumber";
4565
+ /** USDriversLicenseNumber */
4566
+ KnownPiiEntityCategory["USDriversLicenseNumber"] = "USDriversLicenseNumber";
4567
+ /** USIndividualTaxpayerIdentification */
4568
+ KnownPiiEntityCategory["USIndividualTaxpayerIdentification"] = "USIndividualTaxpayerIdentification";
4569
+ /** USSocialSecurityNumber */
4570
+ KnownPiiEntityCategory["USSocialSecurityNumber"] = "USSocialSecurityNumber";
4571
+ /** UAPassportNumberDomestic */
4572
+ KnownPiiEntityCategory["UAPassportNumberDomestic"] = "UAPassportNumberDomestic";
4573
+ /** UAPassportNumberInternational */
4574
+ KnownPiiEntityCategory["UAPassportNumberInternational"] = "UAPassportNumberInternational";
4575
+ /** Organization */
4576
+ KnownPiiEntityCategory["Organization"] = "Organization";
4577
+ /** Email */
4578
+ KnownPiiEntityCategory["Email"] = "Email";
4579
+ /** URL */
4580
+ KnownPiiEntityCategory["URL"] = "URL";
4581
+ /** Age */
4582
+ KnownPiiEntityCategory["Age"] = "Age";
4583
+ /** PhoneNumber */
4584
+ KnownPiiEntityCategory["PhoneNumber"] = "PhoneNumber";
4585
+ /** IPAddress */
4586
+ KnownPiiEntityCategory["IPAddress"] = "IPAddress";
4587
+ /** Date */
4588
+ KnownPiiEntityCategory["Date"] = "Date";
4589
+ /** Person */
4590
+ KnownPiiEntityCategory["Person"] = "Person";
4591
+ /** Address */
4592
+ KnownPiiEntityCategory["Address"] = "Address";
4593
+ /** All */
4594
+ KnownPiiEntityCategory["All"] = "All";
4595
+ /** Default */
4596
+ KnownPiiEntityCategory["Default"] = "Default";
4597
+ })(exports.KnownPiiEntityCategory || (exports.KnownPiiEntityCategory = {}));
4598
+ /** Known values of {@link WarningCode} that the service accepts. */
4599
+ var KnownWarningCode;
4600
+ (function (KnownWarningCode) {
4601
+ /** LongWordsInDocument */
4602
+ KnownWarningCode["LongWordsInDocument"] = "LongWordsInDocument";
4603
+ /** DocumentTruncated */
4604
+ KnownWarningCode["DocumentTruncated"] = "DocumentTruncated";
4605
+ })(KnownWarningCode || (KnownWarningCode = {}));
4606
+ /** Known values of {@link FhirVersion} that the service accepts. */
4607
+ var KnownFhirVersion;
4608
+ (function (KnownFhirVersion) {
4609
+ /** Four01 */
4610
+ KnownFhirVersion["Four01"] = "4.0.1";
4611
+ })(KnownFhirVersion || (KnownFhirVersion = {}));
4612
+ /** Known values of {@link HealthcareEntityCategory} that the service accepts. */
4613
+ var KnownHealthcareEntityCategory;
4614
+ (function (KnownHealthcareEntityCategory) {
4615
+ /** BodyStructure */
4616
+ KnownHealthcareEntityCategory["BodyStructure"] = "BODY_STRUCTURE";
4617
+ /** AGE */
4618
+ KnownHealthcareEntityCategory["AGE"] = "AGE";
4619
+ /** Gender */
4620
+ KnownHealthcareEntityCategory["Gender"] = "GENDER";
4621
+ /** ExaminationName */
4622
+ KnownHealthcareEntityCategory["ExaminationName"] = "EXAMINATION_NAME";
4623
+ /** Date */
4624
+ KnownHealthcareEntityCategory["Date"] = "DATE";
4625
+ /** Direction */
4626
+ KnownHealthcareEntityCategory["Direction"] = "DIRECTION";
4627
+ /** Frequency */
4628
+ KnownHealthcareEntityCategory["Frequency"] = "FREQUENCY";
4629
+ /** MeasurementValue */
4630
+ KnownHealthcareEntityCategory["MeasurementValue"] = "MEASUREMENT_VALUE";
4631
+ /** MeasurementUnit */
4632
+ KnownHealthcareEntityCategory["MeasurementUnit"] = "MEASUREMENT_UNIT";
4633
+ /** RelationalOperator */
4634
+ KnownHealthcareEntityCategory["RelationalOperator"] = "RELATIONAL_OPERATOR";
4635
+ /** Time */
4636
+ KnownHealthcareEntityCategory["Time"] = "TIME";
4637
+ /** GeneORProtein */
4638
+ KnownHealthcareEntityCategory["GeneORProtein"] = "GENE_OR_PROTEIN";
4639
+ /** Variant */
4640
+ KnownHealthcareEntityCategory["Variant"] = "VARIANT";
4641
+ /** AdministrativeEvent */
4642
+ KnownHealthcareEntityCategory["AdministrativeEvent"] = "ADMINISTRATIVE_EVENT";
4643
+ /** CareEnvironment */
4644
+ KnownHealthcareEntityCategory["CareEnvironment"] = "CARE_ENVIRONMENT";
4645
+ /** HealthcareProfession */
4646
+ KnownHealthcareEntityCategory["HealthcareProfession"] = "HEALTHCARE_PROFESSION";
4647
+ /** Diagnosis */
4648
+ KnownHealthcareEntityCategory["Diagnosis"] = "DIAGNOSIS";
4649
+ /** SymptomORSign */
4650
+ KnownHealthcareEntityCategory["SymptomORSign"] = "SYMPTOM_OR_SIGN";
4651
+ /** ConditionQualifier */
4652
+ KnownHealthcareEntityCategory["ConditionQualifier"] = "CONDITION_QUALIFIER";
4653
+ /** MedicationClass */
4654
+ KnownHealthcareEntityCategory["MedicationClass"] = "MEDICATION_CLASS";
4655
+ /** MedicationName */
4656
+ KnownHealthcareEntityCategory["MedicationName"] = "MEDICATION_NAME";
4657
+ /** Dosage */
4658
+ KnownHealthcareEntityCategory["Dosage"] = "DOSAGE";
4659
+ /** MedicationForm */
4660
+ KnownHealthcareEntityCategory["MedicationForm"] = "MEDICATION_FORM";
4661
+ /** MedicationRoute */
4662
+ KnownHealthcareEntityCategory["MedicationRoute"] = "MEDICATION_ROUTE";
4663
+ /** FamilyRelation */
4664
+ KnownHealthcareEntityCategory["FamilyRelation"] = "FAMILY_RELATION";
4665
+ /** TreatmentName */
4666
+ KnownHealthcareEntityCategory["TreatmentName"] = "TREATMENT_NAME";
4667
+ })(KnownHealthcareEntityCategory || (KnownHealthcareEntityCategory = {}));
4668
+ /** Known values of {@link RelationType} that the service accepts. */
4669
+ var KnownRelationType;
4670
+ (function (KnownRelationType) {
4671
+ /** Abbreviation */
4672
+ KnownRelationType["Abbreviation"] = "Abbreviation";
4673
+ /** DirectionOfBodyStructure */
4674
+ KnownRelationType["DirectionOfBodyStructure"] = "DirectionOfBodyStructure";
4675
+ /** DirectionOfCondition */
4676
+ KnownRelationType["DirectionOfCondition"] = "DirectionOfCondition";
4677
+ /** DirectionOfExamination */
4678
+ KnownRelationType["DirectionOfExamination"] = "DirectionOfExamination";
4679
+ /** DirectionOfTreatment */
4680
+ KnownRelationType["DirectionOfTreatment"] = "DirectionOfTreatment";
4681
+ /** DosageOfMedication */
4682
+ KnownRelationType["DosageOfMedication"] = "DosageOfMedication";
4683
+ /** FormOfMedication */
4684
+ KnownRelationType["FormOfMedication"] = "FormOfMedication";
4685
+ /** FrequencyOfMedication */
4686
+ KnownRelationType["FrequencyOfMedication"] = "FrequencyOfMedication";
4687
+ /** FrequencyOfTreatment */
4688
+ KnownRelationType["FrequencyOfTreatment"] = "FrequencyOfTreatment";
4689
+ /** QualifierOfCondition */
4690
+ KnownRelationType["QualifierOfCondition"] = "QualifierOfCondition";
4691
+ /** RelationOfExamination */
4692
+ KnownRelationType["RelationOfExamination"] = "RelationOfExamination";
4693
+ /** RouteOfMedication */
4694
+ KnownRelationType["RouteOfMedication"] = "RouteOfMedication";
4695
+ /** TimeOfCondition */
4696
+ KnownRelationType["TimeOfCondition"] = "TimeOfCondition";
4697
+ /** TimeOfEvent */
4698
+ KnownRelationType["TimeOfEvent"] = "TimeOfEvent";
4699
+ /** TimeOfExamination */
4700
+ KnownRelationType["TimeOfExamination"] = "TimeOfExamination";
4701
+ /** TimeOfMedication */
4702
+ KnownRelationType["TimeOfMedication"] = "TimeOfMedication";
4703
+ /** TimeOfTreatment */
4704
+ KnownRelationType["TimeOfTreatment"] = "TimeOfTreatment";
4705
+ /** UnitOfCondition */
4706
+ KnownRelationType["UnitOfCondition"] = "UnitOfCondition";
4707
+ /** UnitOfExamination */
4708
+ KnownRelationType["UnitOfExamination"] = "UnitOfExamination";
4709
+ /** ValueOfCondition */
4710
+ KnownRelationType["ValueOfCondition"] = "ValueOfCondition";
4711
+ /** ValueOfExamination */
4712
+ KnownRelationType["ValueOfExamination"] = "ValueOfExamination";
4713
+ })(KnownRelationType || (KnownRelationType = {}));
4714
+ /** Known values of {@link ExtractiveSummarizationOrderingCriteria} that the service accepts. */
4715
+ exports.KnownExtractiveSummarizationOrderingCriteria = void 0;
4716
+ (function (KnownExtractiveSummarizationOrderingCriteria) {
4717
+ /** Indicates that results should be sorted in order of appearance in the text. */
4718
+ KnownExtractiveSummarizationOrderingCriteria["Offset"] = "Offset";
4719
+ /** Indicates that results should be sorted in order of importance (i.e. rank score) according to the model. */
4720
+ KnownExtractiveSummarizationOrderingCriteria["Rank"] = "Rank";
4721
+ })(exports.KnownExtractiveSummarizationOrderingCriteria || (exports.KnownExtractiveSummarizationOrderingCriteria = {}));
4722
+
4723
+ // Copyright (c) Microsoft Corporation.
4724
+ /**
4725
+ * Type of actions supported by the {@link TextAnalysisClient.analyze} method.
4726
+ */
4727
+ const AnalyzeActionNames = {
4728
+ EntityLinking: "EntityLinking",
4729
+ EntityRecognition: "EntityRecognition",
4730
+ KeyPhraseExtraction: "KeyPhraseExtraction",
4731
+ PiiEntityRecognition: "PiiEntityRecognition",
4732
+ LanguageDetection: "LanguageDetection",
4733
+ SentimentAnalysis: "SentimentAnalysis",
4734
+ };
4735
+ /**
4736
+ * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.
4737
+ */
4738
+ const AnalyzeBatchActionNames = {
4739
+ SentimentAnalysis: "SentimentAnalysis",
4740
+ EntityRecognition: "EntityRecognition",
4741
+ PiiEntityRecognition: "PiiEntityRecognition",
4742
+ KeyPhraseExtraction: "KeyPhraseExtraction",
4743
+ EntityLinking: "EntityLinking",
4744
+ Healthcare: "Healthcare",
4745
+ ExtractiveSummarization: "ExtractiveSummarization",
4746
+ CustomEntityRecognition: "CustomEntityRecognition",
4747
+ CustomSingleLabelClassification: "CustomSingleLabelClassification",
4748
+ CustomMultiLabelClassification: "CustomMultiLabelClassification",
4749
+ };
4750
+ /**
4751
+ * Known values of the {@link HealthcareAction.fhirVersion} parameter.
4752
+ */
4753
+ exports.KnownFhirVersion = void 0;
4754
+ (function (KnownFhirVersion) {
4755
+ /** 4.0.1 */
4756
+ KnownFhirVersion["4.0.1"] = "4.0.1";
4757
+ })(exports.KnownFhirVersion || (exports.KnownFhirVersion = {}));
4758
+ /**
4759
+ * Enum of possible error codes of a {@link TextAnalysisError}.
4760
+ */
4761
+ const KnownTextAnalysisErrorCode = Object.assign(Object.assign({}, exports.KnownErrorCode), exports.KnownInnerErrorCode);
4762
+
4763
+ Object.defineProperty(exports, 'AzureKeyCredential', {
4764
+ enumerable: true,
4765
+ get: function () { return coreAuth.AzureKeyCredential; }
4766
+ });
4767
+ exports.AnalyzeActionNames = AnalyzeActionNames;
4768
+ exports.AnalyzeBatchActionNames = AnalyzeBatchActionNames;
4769
+ exports.KnownTextAnalysisErrorCode = KnownTextAnalysisErrorCode;
4770
+ exports.TextAnalysisClient = TextAnalysisClient;
4771
+ //# sourceMappingURL=index.js.map