azure_cognitiveservices_formrecognizer 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. checksums.yaml +5 -5
  2. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer.rb +27 -12
  3. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/form_recognizer_client.rb +352 -49
  4. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/computer_vision_error.rb +69 -0
  5. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/element_reference.rb +46 -0
  6. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/field_value.rb +79 -0
  7. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/image_url.rb +47 -0
  8. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/line.rb +85 -0
  9. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/number_value.rb +86 -0
  10. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/read_receipt_result.rb +91 -0
  11. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/string_value.rb +86 -0
  12. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/text_operation_status_codes.rb +18 -0
  13. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/text_recognition_result.rb +114 -0
  14. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/text_recognition_result_confidence_class.rb +16 -0
  15. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/text_recognition_result_dimension_unit.rb +16 -0
  16. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/train_request.rb +13 -0
  17. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/train_source_filter.rb +65 -0
  18. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/understanding_result.rb +78 -0
  19. data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/word.rb +78 -0
  20. data/lib/profiles/latest/modules/formrecognizer_profile_module.rb +98 -38
  21. data/lib/version.rb +1 -1
  22. metadata +20 -5
@@ -0,0 +1,86 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
7
+ module Models
8
+ #
9
+ # Recognized string field value.
10
+ #
11
+ class StringValue < FieldValue
12
+
13
+ include MsRestAzure
14
+
15
+
16
+ def initialize
17
+ @valueType = "stringValue"
18
+ end
19
+
20
+ attr_accessor :valueType
21
+
22
+ # @return [String] String value of the recognized field.
23
+ attr_accessor :value
24
+
25
+
26
+ #
27
+ # Mapper for StringValue class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'stringValue',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'StringValue',
38
+ model_properties: {
39
+ text: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'text',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ elements: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'elements',
51
+ type: {
52
+ name: 'Sequence',
53
+ element: {
54
+ client_side_validation: true,
55
+ required: false,
56
+ serialized_name: 'ElementReferenceElementType',
57
+ type: {
58
+ name: 'Composite',
59
+ class_name: 'ElementReference'
60
+ }
61
+ }
62
+ }
63
+ },
64
+ valueType: {
65
+ client_side_validation: true,
66
+ required: true,
67
+ serialized_name: 'valueType',
68
+ type: {
69
+ name: 'String'
70
+ }
71
+ },
72
+ value: {
73
+ client_side_validation: true,
74
+ required: false,
75
+ serialized_name: 'value',
76
+ type: {
77
+ name: 'String'
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
7
+ module Models
8
+ #
9
+ # Defines values for TextOperationStatusCodes
10
+ #
11
+ module TextOperationStatusCodes
12
+ NotStarted = "Not Started"
13
+ Running = "Running"
14
+ Failed = "Failed"
15
+ Succeeded = "Succeeded"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,114 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
7
+ module Models
8
+ #
9
+ # An object representing a recognized text region
10
+ #
11
+ class TextRecognitionResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Integer] The 1-based page number of the recognition result.
16
+ attr_accessor :page
17
+
18
+ # @return [Float] The orientation of the image in degrees in the
19
+ # clockwise direction. Range between [0, 360).
20
+ attr_accessor :clockwise_orientation
21
+
22
+ # @return [Float] The width of the image in pixels or the PDF in inches.
23
+ attr_accessor :width
24
+
25
+ # @return [Float] The height of the image in pixels or the PDF in inches.
26
+ attr_accessor :height
27
+
28
+ # @return [TextRecognitionResultDimensionUnit] The unit used in the
29
+ # Width, Height and BoundingBox. For images, the unit is 'pixel'. For
30
+ # PDF, the unit is 'inch'. Possible values include: 'pixel', 'inch'
31
+ attr_accessor :unit
32
+
33
+ # @return [Array<Line>] A list of recognized text lines.
34
+ attr_accessor :lines
35
+
36
+
37
+ #
38
+ # Mapper for TextRecognitionResult class as Ruby Hash.
39
+ # This will be used for serialization/deserialization.
40
+ #
41
+ def self.mapper()
42
+ {
43
+ client_side_validation: true,
44
+ required: false,
45
+ serialized_name: 'TextRecognitionResult',
46
+ type: {
47
+ name: 'Composite',
48
+ class_name: 'TextRecognitionResult',
49
+ model_properties: {
50
+ page: {
51
+ client_side_validation: true,
52
+ required: false,
53
+ serialized_name: 'page',
54
+ type: {
55
+ name: 'Number'
56
+ }
57
+ },
58
+ clockwise_orientation: {
59
+ client_side_validation: true,
60
+ required: false,
61
+ serialized_name: 'clockwiseOrientation',
62
+ type: {
63
+ name: 'Double'
64
+ }
65
+ },
66
+ width: {
67
+ client_side_validation: true,
68
+ required: false,
69
+ serialized_name: 'width',
70
+ type: {
71
+ name: 'Double'
72
+ }
73
+ },
74
+ height: {
75
+ client_side_validation: true,
76
+ required: false,
77
+ serialized_name: 'height',
78
+ type: {
79
+ name: 'Double'
80
+ }
81
+ },
82
+ unit: {
83
+ client_side_validation: true,
84
+ required: false,
85
+ serialized_name: 'unit',
86
+ type: {
87
+ name: 'Enum',
88
+ module: 'TextRecognitionResultDimensionUnit'
89
+ }
90
+ },
91
+ lines: {
92
+ client_side_validation: true,
93
+ required: true,
94
+ serialized_name: 'lines',
95
+ type: {
96
+ name: 'Sequence',
97
+ element: {
98
+ client_side_validation: true,
99
+ required: false,
100
+ serialized_name: 'LineElementType',
101
+ type: {
102
+ name: 'Composite',
103
+ class_name: 'Line'
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }
111
+ end
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
7
+ module Models
8
+ #
9
+ # Defines values for TextRecognitionResultConfidenceClass
10
+ #
11
+ module TextRecognitionResultConfidenceClass
12
+ High = "High"
13
+ Low = "Low"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
7
+ module Models
8
+ #
9
+ # Defines values for TextRecognitionResultDimensionUnit
10
+ #
11
+ module TextRecognitionResultDimensionUnit
12
+ Pixel = "pixel"
13
+ Inch = "inch"
14
+ end
15
+ end
16
+ end
@@ -15,6 +15,10 @@ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
15
15
  # @return [String] Get or set source path.
16
16
  attr_accessor :source
17
17
 
18
+ # @return [TrainSourceFilter] Get or set filter to further search the
19
+ # source path for content.
20
+ attr_accessor :source_filter
21
+
18
22
 
19
23
  #
20
24
  # Mapper for TrainRequest class as Ruby Hash.
@@ -40,6 +44,15 @@ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
40
44
  type: {
41
45
  name: 'String'
42
46
  }
47
+ },
48
+ source_filter: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ serialized_name: 'sourceFilter',
52
+ type: {
53
+ name: 'Composite',
54
+ class_name: 'TrainSourceFilter'
55
+ }
43
56
  }
44
57
  }
45
58
  }
@@ -0,0 +1,65 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
7
+ module Models
8
+ #
9
+ # Filters to be applied when traversing a data source.
10
+ #
11
+ class TrainSourceFilter
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] A case-sensitive prefix string to filter content
16
+ # under the source location. For e.g., when using a Azure Blob
17
+ # Uri use the prefix to restrict subfolders for content.
18
+ attr_accessor :prefix
19
+
20
+ # @return [Boolean] A flag to indicate if sub folders within the set of
21
+ # prefix folders will also need to be included when searching
22
+ # for content to be preprocessed.
23
+ attr_accessor :include_sub_folders
24
+
25
+
26
+ #
27
+ # Mapper for TrainSourceFilter class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'TrainSourceFilter',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'TrainSourceFilter',
38
+ model_properties: {
39
+ prefix: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'prefix',
43
+ constraints: {
44
+ MaxLength: 128,
45
+ MinLength: 0
46
+ },
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ include_sub_folders: {
52
+ client_side_validation: true,
53
+ required: false,
54
+ serialized_name: 'includeSubFolders',
55
+ type: {
56
+ name: 'Boolean'
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,78 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
7
+ module Models
8
+ #
9
+ # A set of extracted fields corresponding to a semantic object, such as a
10
+ # receipt, in the input document.
11
+ #
12
+ class UnderstandingResult
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [Array<Integer>] List of pages where the document is found.
17
+ attr_accessor :pages
18
+
19
+ # @return [Hash{String => FieldValue}] Dictionary of recognized field
20
+ # values.
21
+ attr_accessor :fields
22
+
23
+
24
+ #
25
+ # Mapper for UnderstandingResult class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ client_side_validation: true,
31
+ required: false,
32
+ serialized_name: 'understandingResult',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'UnderstandingResult',
36
+ model_properties: {
37
+ pages: {
38
+ client_side_validation: true,
39
+ required: false,
40
+ serialized_name: 'pages',
41
+ type: {
42
+ name: 'Sequence',
43
+ element: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ serialized_name: 'NumberElementType',
47
+ type: {
48
+ name: 'Number'
49
+ }
50
+ }
51
+ }
52
+ },
53
+ fields: {
54
+ client_side_validation: true,
55
+ required: false,
56
+ serialized_name: 'fields',
57
+ type: {
58
+ name: 'Dictionary',
59
+ value: {
60
+ client_side_validation: true,
61
+ required: false,
62
+ serialized_name: 'FieldValueElementType',
63
+ type: {
64
+ name: 'Composite',
65
+ polymorphic_discriminator: 'valueType',
66
+ uber_parent: 'FieldValue',
67
+ class_name: 'FieldValue'
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,78 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::FormRecognizer::V1_0_preview
7
+ module Models
8
+ #
9
+ # An object representing a recognized word.
10
+ #
11
+ class Word
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Integer>] Bounding box of a recognized word.
16
+ attr_accessor :bounding_box
17
+
18
+ # @return [String] The text content of the word.
19
+ attr_accessor :text
20
+
21
+ # @return [TextRecognitionResultConfidenceClass] Qualitative confidence
22
+ # measure. Possible values include: 'High', 'Low'
23
+ attr_accessor :confidence
24
+
25
+
26
+ #
27
+ # Mapper for Word class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'Word',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'Word',
38
+ model_properties: {
39
+ bounding_box: {
40
+ client_side_validation: true,
41
+ required: true,
42
+ serialized_name: 'boundingBox',
43
+ type: {
44
+ name: 'Sequence',
45
+ element: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'NumberElementType',
49
+ type: {
50
+ name: 'Number'
51
+ }
52
+ }
53
+ }
54
+ },
55
+ text: {
56
+ client_side_validation: true,
57
+ required: true,
58
+ serialized_name: 'text',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ confidence: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ serialized_name: 'confidence',
67
+ type: {
68
+ name: 'Enum',
69
+ module: 'TextRecognitionResultConfidenceClass'
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
+ end
76
+ end
77
+ end
78
+ end