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.
- checksums.yaml +5 -5
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer.rb +27 -12
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/form_recognizer_client.rb +352 -49
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/computer_vision_error.rb +69 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/element_reference.rb +46 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/field_value.rb +79 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/image_url.rb +47 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/line.rb +85 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/number_value.rb +86 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/read_receipt_result.rb +91 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/string_value.rb +86 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/text_operation_status_codes.rb +18 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/text_recognition_result.rb +114 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/text_recognition_result_confidence_class.rb +16 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/text_recognition_result_dimension_unit.rb +16 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/train_request.rb +13 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/train_source_filter.rb +65 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/understanding_result.rb +78 -0
- data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/word.rb +78 -0
- data/lib/profiles/latest/modules/formrecognizer_profile_module.rb +98 -38
- data/lib/version.rb +1 -1
- metadata +20 -5
@@ -0,0 +1,69 @@
|
|
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
|
+
# Details about the API request error.
|
10
|
+
#
|
11
|
+
class ComputerVisionError
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return The error code.
|
16
|
+
attr_accessor :code
|
17
|
+
|
18
|
+
# @return [String] A message explaining the error reported by the
|
19
|
+
# service.
|
20
|
+
attr_accessor :message
|
21
|
+
|
22
|
+
# @return [String] A unique request identifier.
|
23
|
+
attr_accessor :request_id
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for ComputerVisionError 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: 'ComputerVisionError',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'ComputerVisionError',
|
38
|
+
model_properties: {
|
39
|
+
code: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: true,
|
42
|
+
serialized_name: 'code',
|
43
|
+
type: {
|
44
|
+
name: 'Object'
|
45
|
+
}
|
46
|
+
},
|
47
|
+
message: {
|
48
|
+
client_side_validation: true,
|
49
|
+
required: true,
|
50
|
+
serialized_name: 'message',
|
51
|
+
type: {
|
52
|
+
name: 'String'
|
53
|
+
}
|
54
|
+
},
|
55
|
+
request_id: {
|
56
|
+
client_side_validation: true,
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'requestId',
|
59
|
+
type: {
|
60
|
+
name: 'String'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/element_reference.rb
ADDED
@@ -0,0 +1,46 @@
|
|
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
|
+
# Reference to an OCR word.
|
10
|
+
#
|
11
|
+
class ElementReference
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :ref
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for ElementReference class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
client_side_validation: true,
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'elementReference',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'ElementReference',
|
31
|
+
model_properties: {
|
32
|
+
ref: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
serialized_name: '$ref',
|
36
|
+
type: {
|
37
|
+
name: 'String'
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,79 @@
|
|
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
|
+
# Base class representing a recognized field value.
|
10
|
+
#
|
11
|
+
class FieldValue
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
@@discriminatorMap = Hash.new
|
16
|
+
@@discriminatorMap["stringValue"] = "StringValue"
|
17
|
+
@@discriminatorMap["numberValue"] = "NumberValue"
|
18
|
+
|
19
|
+
def initialize
|
20
|
+
@valueType = "fieldValue"
|
21
|
+
end
|
22
|
+
|
23
|
+
attr_accessor :valueType
|
24
|
+
|
25
|
+
# @return [String] OCR text content of the recognized field.
|
26
|
+
attr_accessor :text
|
27
|
+
|
28
|
+
# @return [Array<ElementReference>] List of references to OCR words
|
29
|
+
# comprising the recognized field value.
|
30
|
+
attr_accessor :elements
|
31
|
+
|
32
|
+
|
33
|
+
#
|
34
|
+
# Mapper for FieldValue class as Ruby Hash.
|
35
|
+
# This will be used for serialization/deserialization.
|
36
|
+
#
|
37
|
+
def self.mapper()
|
38
|
+
{
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'fieldValue',
|
42
|
+
type: {
|
43
|
+
name: 'Composite',
|
44
|
+
polymorphic_discriminator: 'valueType',
|
45
|
+
uber_parent: 'FieldValue',
|
46
|
+
class_name: 'FieldValue',
|
47
|
+
model_properties: {
|
48
|
+
text: {
|
49
|
+
client_side_validation: true,
|
50
|
+
required: false,
|
51
|
+
serialized_name: 'text',
|
52
|
+
type: {
|
53
|
+
name: 'String'
|
54
|
+
}
|
55
|
+
},
|
56
|
+
elements: {
|
57
|
+
client_side_validation: true,
|
58
|
+
required: false,
|
59
|
+
serialized_name: 'elements',
|
60
|
+
type: {
|
61
|
+
name: 'Sequence',
|
62
|
+
element: {
|
63
|
+
client_side_validation: true,
|
64
|
+
required: false,
|
65
|
+
serialized_name: 'ElementReferenceElementType',
|
66
|
+
type: {
|
67
|
+
name: 'Composite',
|
68
|
+
class_name: 'ElementReference'
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,47 @@
|
|
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
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class ImageUrl
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] Publicly reachable URL of an image.
|
17
|
+
attr_accessor :url
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# Mapper for ImageUrl class as Ruby Hash.
|
22
|
+
# This will be used for serialization/deserialization.
|
23
|
+
#
|
24
|
+
def self.mapper()
|
25
|
+
{
|
26
|
+
client_side_validation: true,
|
27
|
+
required: false,
|
28
|
+
serialized_name: 'ImageUrl',
|
29
|
+
type: {
|
30
|
+
name: 'Composite',
|
31
|
+
class_name: 'ImageUrl',
|
32
|
+
model_properties: {
|
33
|
+
url: {
|
34
|
+
client_side_validation: true,
|
35
|
+
required: true,
|
36
|
+
serialized_name: 'url',
|
37
|
+
type: {
|
38
|
+
name: 'String'
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,85 @@
|
|
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 line.
|
10
|
+
#
|
11
|
+
class Line
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<Integer>] Bounding box of a recognized line.
|
16
|
+
attr_accessor :bounding_box
|
17
|
+
|
18
|
+
# @return [String] The text content of the line.
|
19
|
+
attr_accessor :text
|
20
|
+
|
21
|
+
# @return [Array<Word>] List of words in the text line.
|
22
|
+
attr_accessor :words
|
23
|
+
|
24
|
+
|
25
|
+
#
|
26
|
+
# Mapper for Line class as Ruby Hash.
|
27
|
+
# This will be used for serialization/deserialization.
|
28
|
+
#
|
29
|
+
def self.mapper()
|
30
|
+
{
|
31
|
+
client_side_validation: true,
|
32
|
+
required: false,
|
33
|
+
serialized_name: 'Line',
|
34
|
+
type: {
|
35
|
+
name: 'Composite',
|
36
|
+
class_name: 'Line',
|
37
|
+
model_properties: {
|
38
|
+
bounding_box: {
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'boundingBox',
|
42
|
+
type: {
|
43
|
+
name: 'Sequence',
|
44
|
+
element: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
serialized_name: 'NumberElementType',
|
48
|
+
type: {
|
49
|
+
name: 'Number'
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
54
|
+
text: {
|
55
|
+
client_side_validation: true,
|
56
|
+
required: false,
|
57
|
+
serialized_name: 'text',
|
58
|
+
type: {
|
59
|
+
name: 'String'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
words: {
|
63
|
+
client_side_validation: true,
|
64
|
+
required: false,
|
65
|
+
serialized_name: 'words',
|
66
|
+
type: {
|
67
|
+
name: 'Sequence',
|
68
|
+
element: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
serialized_name: 'WordElementType',
|
72
|
+
type: {
|
73
|
+
name: 'Composite',
|
74
|
+
class_name: 'Word'
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -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 numeric field value.
|
10
|
+
#
|
11
|
+
class NumberValue < FieldValue
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
@valueType = "numberValue"
|
18
|
+
end
|
19
|
+
|
20
|
+
attr_accessor :valueType
|
21
|
+
|
22
|
+
# @return [Float] Numeric value of the recognized field.
|
23
|
+
attr_accessor :value
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for NumberValue 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: 'numberValue',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'NumberValue',
|
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: 'Double'
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
data/lib/1.0-preview/generated/azure_cognitiveservices_formrecognizer/models/read_receipt_result.rb
ADDED
@@ -0,0 +1,91 @@
|
|
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
|
+
# Analysis result of the 'Batch Read Receipt' operation.
|
10
|
+
#
|
11
|
+
class ReadReceiptResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [TextOperationStatusCodes] Status of the read operation.
|
16
|
+
# Possible values include: 'Not Started', 'Running', 'Failed',
|
17
|
+
# 'Succeeded'
|
18
|
+
attr_accessor :status
|
19
|
+
|
20
|
+
# @return [Array<TextRecognitionResult>] Text recognition result of the
|
21
|
+
# 'Batch Read Receipt' operation.
|
22
|
+
attr_accessor :recognition_results
|
23
|
+
|
24
|
+
# @return [Array<UnderstandingResult>] Semantic understanding result of
|
25
|
+
# the 'Batch Read Receipt' operation.
|
26
|
+
attr_accessor :understanding_results
|
27
|
+
|
28
|
+
|
29
|
+
#
|
30
|
+
# Mapper for ReadReceiptResult class as Ruby Hash.
|
31
|
+
# This will be used for serialization/deserialization.
|
32
|
+
#
|
33
|
+
def self.mapper()
|
34
|
+
{
|
35
|
+
client_side_validation: true,
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'readReceiptResult',
|
38
|
+
type: {
|
39
|
+
name: 'Composite',
|
40
|
+
class_name: 'ReadReceiptResult',
|
41
|
+
model_properties: {
|
42
|
+
status: {
|
43
|
+
client_side_validation: true,
|
44
|
+
required: false,
|
45
|
+
serialized_name: 'status',
|
46
|
+
type: {
|
47
|
+
name: 'Enum',
|
48
|
+
module: 'TextOperationStatusCodes'
|
49
|
+
}
|
50
|
+
},
|
51
|
+
recognition_results: {
|
52
|
+
client_side_validation: true,
|
53
|
+
required: false,
|
54
|
+
serialized_name: 'recognitionResults',
|
55
|
+
type: {
|
56
|
+
name: 'Sequence',
|
57
|
+
element: {
|
58
|
+
client_side_validation: true,
|
59
|
+
required: false,
|
60
|
+
serialized_name: 'TextRecognitionResultElementType',
|
61
|
+
type: {
|
62
|
+
name: 'Composite',
|
63
|
+
class_name: 'TextRecognitionResult'
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
},
|
68
|
+
understanding_results: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
serialized_name: 'understandingResults',
|
72
|
+
type: {
|
73
|
+
name: 'Sequence',
|
74
|
+
element: {
|
75
|
+
client_side_validation: true,
|
76
|
+
required: false,
|
77
|
+
serialized_name: 'UnderstandingResultElementType',
|
78
|
+
type: {
|
79
|
+
name: 'Composite',
|
80
|
+
class_name: 'UnderstandingResult'
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|