google-cloud-document_ai-v1beta3 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +4 -13
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +4 -4
- data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/type/color.rb +16 -11
- data/proto_docs/google/type/date.rb +14 -11
- data/proto_docs/google/type/datetime.rb +9 -1
- data/proto_docs/google/type/money.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3d3ec1b0a579c0f9cd3c746d04f134df4d220b34b68ee4ee08818d3823a3814
|
4
|
+
data.tar.gz: 2e2c22303302e83f35bf2fe12c9a136adb4a60f1c8b5590a83b6f71a39b1192e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd5af612a18543e5a7c91b93bc412a447d498dbf32d9a13873375beae37912471f37c37683ae222d535bd165eac638307772f67f9acd504ca5e78392d365627
|
7
|
+
data.tar.gz: a581b6dd97f6542639367ba8bd74cbc4e851808171fe0ed24286259a5b66552c61cd7ac6fb2d942f243069761c865429d963e635a2a61880cdd0dc157e441f4b
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-document_ai-v1beta3
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `DOCUMENT_AI_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `DOCUMENT_AI_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/document_ai/v1beta3"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/document_ai/v1beta3"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/document_ai/v1beta3"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/document_ai/v1beta3"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::DocumentAI::V1beta3::ProcessRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.process_document request
|
38
38
|
```
|
39
39
|
|
@@ -70,26 +70,17 @@ module Google
|
|
70
70
|
|
71
71
|
default_config.rpcs.process_document.timeout = 120.0
|
72
72
|
default_config.rpcs.process_document.retry_policy = {
|
73
|
-
initial_delay: 0.1,
|
74
|
-
max_delay: 60.0,
|
75
|
-
multiplier: 1.3,
|
76
|
-
retry_codes: [4, 14]
|
73
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
77
74
|
}
|
78
75
|
|
79
76
|
default_config.rpcs.batch_process_documents.timeout = 120.0
|
80
77
|
default_config.rpcs.batch_process_documents.retry_policy = {
|
81
|
-
initial_delay: 0.1,
|
82
|
-
max_delay: 60.0,
|
83
|
-
multiplier: 1.3,
|
84
|
-
retry_codes: [4, 14]
|
78
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
85
79
|
}
|
86
80
|
|
87
81
|
default_config.rpcs.review_document.timeout = 120.0
|
88
82
|
default_config.rpcs.review_document.retry_policy = {
|
89
|
-
initial_delay: 0.1,
|
90
|
-
max_delay: 60.0,
|
91
|
-
multiplier: 1.3,
|
92
|
-
retry_codes: [4, 14]
|
83
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
93
84
|
}
|
94
85
|
|
95
86
|
default_config
|
@@ -160,7 +151,7 @@ module Google
|
|
160
151
|
!@config.endpoint.split(".").first.include?("-")
|
161
152
|
credentials ||= Credentials.default scope: @config.scope,
|
162
153
|
enable_self_signed_jwt: enable_self_signed_jwt
|
163
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
154
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
164
155
|
credentials = Credentials.new credentials, scope: @config.scope
|
165
156
|
end
|
166
157
|
@quota_project_id = @config.quota_project
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -396,9 +396,9 @@ module Google
|
|
396
396
|
end
|
397
397
|
|
398
398
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
399
|
+
# Waits until the specified long-running operation is done or reaches at most
|
400
|
+
# a specified timeout, returning the latest state. If the operation is
|
401
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
402
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
403
|
# timeout is used. If the server does not support this method, it returns
|
404
404
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -21,17 +21,22 @@ module Google
|
|
21
21
|
module Type
|
22
22
|
# Represents a color in the RGBA color space. This representation is designed
|
23
23
|
# for simplicity of conversion to/from color representations in various
|
24
|
-
# languages over compactness
|
25
|
-
# can be trivially provided to the constructor of
|
26
|
-
# can also be trivially provided to UIColor's
|
24
|
+
# languages over compactness. For example, the fields of this representation
|
25
|
+
# can be trivially provided to the constructor of `java.awt.Color` in Java; it
|
26
|
+
# can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
27
27
|
# method in iOS; and, with just a little work, it can be easily formatted into
|
28
|
-
# a CSS
|
28
|
+
# a CSS `rgba()` string in JavaScript.
|
29
29
|
#
|
30
|
-
#
|
30
|
+
# This reference page doesn't carry information about the absolute color
|
31
|
+
# space
|
31
32
|
# that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
|
32
|
-
# DCI-P3, BT.2020, etc.). By default, applications
|
33
|
+
# DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color
|
33
34
|
# space.
|
34
35
|
#
|
36
|
+
# When color equality needs to be decided, implementations, unless
|
37
|
+
# documented otherwise, treat two colors as equal if all their red,
|
38
|
+
# green, blue, and alpha values each differ by at most 1e-5.
|
39
|
+
#
|
35
40
|
# Example (Java):
|
36
41
|
#
|
37
42
|
# import com.google.type.Color;
|
@@ -117,7 +122,7 @@ module Google
|
|
117
122
|
# var blue = Math.floor(blueFrac * 255);
|
118
123
|
#
|
119
124
|
# if (!('alpha' in rgb_color)) {
|
120
|
-
# return
|
125
|
+
# return rgbToCssColor(red, green, blue);
|
121
126
|
# }
|
122
127
|
#
|
123
128
|
# var alphaFrac = rgb_color.alpha.value || 0.0;
|
@@ -125,7 +130,7 @@ module Google
|
|
125
130
|
# return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
|
126
131
|
# };
|
127
132
|
#
|
128
|
-
# var
|
133
|
+
# var rgbToCssColor = function(red, green, blue) {
|
129
134
|
# var rgbNumber = new Number((red << 16) | (green << 8) | blue);
|
130
135
|
# var hexString = rgbNumber.toString(16);
|
131
136
|
# var missingZeros = 6 - hexString.length;
|
@@ -152,14 +157,14 @@ module Google
|
|
152
157
|
# The fraction of this color that should be applied to the pixel. That is,
|
153
158
|
# the final pixel color is defined by the equation:
|
154
159
|
#
|
155
|
-
# pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
|
160
|
+
# `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`
|
156
161
|
#
|
157
162
|
# This means that a value of 1.0 corresponds to a solid color, whereas
|
158
163
|
# a value of 0.0 corresponds to a completely transparent color. This
|
159
164
|
# uses a wrapper message rather than a simple float scalar so that it is
|
160
165
|
# possible to distinguish between a default value and the value being unset.
|
161
|
-
# If omitted, this color object is
|
162
|
-
# (as if the alpha value had been explicitly given
|
166
|
+
# If omitted, this color object is rendered as a solid color
|
167
|
+
# (as if the alpha value had been explicitly given a value of 1.0).
|
163
168
|
class Color
|
164
169
|
include ::Google::Protobuf::MessageExts
|
165
170
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -19,28 +19,31 @@
|
|
19
19
|
|
20
20
|
module Google
|
21
21
|
module Type
|
22
|
-
# Represents a whole or partial calendar date,
|
23
|
-
# and time zone are either specified elsewhere or are
|
24
|
-
# is relative to the
|
22
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
23
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
24
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
25
|
+
# following:
|
25
26
|
#
|
26
|
-
# * A full date, with non-zero year, month and day values
|
27
|
-
# * A month and day value, with a zero year,
|
27
|
+
# * A full date, with non-zero year, month, and day values
|
28
|
+
# * A month and day value, with a zero year, such as an anniversary
|
28
29
|
# * A year on its own, with zero month and day values
|
29
|
-
# * A year and month value, with a zero day,
|
30
|
+
# * A year and month value, with a zero day, such as a credit card expiration
|
31
|
+
# date
|
30
32
|
#
|
31
|
-
# Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
|
33
|
+
# Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
|
34
|
+
# `google.protobuf.Timestamp`.
|
32
35
|
# @!attribute [rw] year
|
33
36
|
# @return [::Integer]
|
34
|
-
# Year of date. Must be from 1 to 9999, or 0
|
37
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without
|
35
38
|
# a year.
|
36
39
|
# @!attribute [rw] month
|
37
40
|
# @return [::Integer]
|
38
|
-
# Month of year. Must be from 1 to 12, or 0
|
41
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a
|
39
42
|
# month and day.
|
40
43
|
# @!attribute [rw] day
|
41
44
|
# @return [::Integer]
|
42
|
-
# Day of month. Must be from 1 to 31 and valid for the year and month, or 0
|
43
|
-
#
|
45
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
|
46
|
+
# to specify a year by itself or a year and month where the day isn't
|
44
47
|
# significant.
|
45
48
|
class Date
|
46
49
|
include ::Google::Protobuf::MessageExts
|
@@ -19,7 +19,9 @@
|
|
19
19
|
|
20
20
|
module Google
|
21
21
|
module Type
|
22
|
-
# Represents civil time
|
22
|
+
# Represents civil time (or occasionally physical time).
|
23
|
+
#
|
24
|
+
# This type can represent a civil time in one of a few possible ways:
|
23
25
|
#
|
24
26
|
# * When utc_offset is set and time_zone is unset: a civil time on a calendar
|
25
27
|
# day with a particular offset from UTC.
|
@@ -33,6 +35,12 @@ module Google
|
|
33
35
|
# If year is 0, the DateTime is considered not to have a specific year. month
|
34
36
|
# and day must have valid, non-zero values.
|
35
37
|
#
|
38
|
+
# This type may also be used to represent a physical time if all the date and
|
39
|
+
# time fields are set and either case of the `time_offset` oneof is set.
|
40
|
+
# Consider using `Timestamp` message for physical time instead. If your use
|
41
|
+
# case also would like to store the user's timezone, that can be done in
|
42
|
+
# another field.
|
43
|
+
#
|
36
44
|
# This type is more flexible than some applications may want. Make sure to
|
37
45
|
# document and validate your application's limitations.
|
38
46
|
# @!attribute [rw] year
|
@@ -22,7 +22,7 @@ module Google
|
|
22
22
|
# Represents an amount of money with its currency type.
|
23
23
|
# @!attribute [rw] currency_code
|
24
24
|
# @return [::String]
|
25
|
-
# The
|
25
|
+
# The three-letter currency code defined in ISO 4217.
|
26
26
|
# @!attribute [rw] units
|
27
27
|
# @return [::Integer]
|
28
28
|
# The whole units of the amount.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-document_ai-v1beta3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|