google-apis-documentai_v1beta3 0.8.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/lib/google/apis/documentai_v1beta3.rb +1 -1
- data/lib/google/apis/documentai_v1beta3/classes.rb +752 -283
- data/lib/google/apis/documentai_v1beta3/gem_version.rb +3 -3
- data/lib/google/apis/documentai_v1beta3/representations.rb +232 -14
- data/lib/google/apis/documentai_v1beta3/service.rb +288 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a11fc86d5bd724a3193ac62b86c11fc40c64dd28701368c6ad74d2174b64557f
|
4
|
+
data.tar.gz: 0ac384ee62d07dda9c47bf7a98c6ab48a3c1ab91705662cd3f5cbff63d77aa53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff249d354f7e0c2dace85fdeb6832502144f7d611ac1d9de8baf0bd4d8b8f6b45b735f6af31c889c4624f7e84a2afb18600e75c8866fffe95fd486d7d2bf1567
|
7
|
+
data.tar.gz: f54d1a6e9aa70055ce89942e0ec29778bc5a36114703605826b185981a9e2d9b83f12b7db79448812c67477bd74dc3e8d8b2e8b13a7bcf3f864d0db349840147
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Release history for google-apis-documentai_v1beta3
|
2
2
|
|
3
|
+
### v0.13.0 (2021-06-03)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210527
|
6
|
+
* Regenerated using generator version 0.3.0
|
7
|
+
|
8
|
+
### v0.12.0 (2021-05-25)
|
9
|
+
|
10
|
+
* Regenerated from discovery document revision 20210520
|
11
|
+
|
12
|
+
### v0.11.0 (2021-05-19)
|
13
|
+
|
14
|
+
* Unspecified changes
|
15
|
+
|
16
|
+
### v0.10.0 (2021-05-12)
|
17
|
+
|
18
|
+
* Regenerated from discovery document revision 20210507
|
19
|
+
|
20
|
+
### v0.9.0 (2021-03-31)
|
21
|
+
|
22
|
+
* Regenerated from discovery document revision 20210329
|
23
|
+
|
3
24
|
### v0.8.0 (2021-03-24)
|
4
25
|
|
5
26
|
* Regenerated from discovery document revision 20210320
|
@@ -31,7 +31,7 @@ module Google
|
|
31
31
|
# This is NOT the gem version.
|
32
32
|
VERSION = 'V1beta3'
|
33
33
|
|
34
|
-
#
|
34
|
+
# See, edit, configure, and delete your Google Cloud Platform data
|
35
35
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
36
36
|
end
|
37
37
|
end
|
@@ -271,25 +271,6 @@ module Google
|
|
271
271
|
end
|
272
272
|
end
|
273
273
|
|
274
|
-
# The long running operation metadata for SampleDataset.
|
275
|
-
class GoogleCloudDocumentaiUiv1beta3SampleDatasetMetadata
|
276
|
-
include Google::Apis::Core::Hashable
|
277
|
-
|
278
|
-
# The common metadata for long running operations.
|
279
|
-
# Corresponds to the JSON property `commonMetadata`
|
280
|
-
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata]
|
281
|
-
attr_accessor :common_metadata
|
282
|
-
|
283
|
-
def initialize(**args)
|
284
|
-
update!(**args)
|
285
|
-
end
|
286
|
-
|
287
|
-
# Update properties of this object
|
288
|
-
def update!(**args)
|
289
|
-
@common_metadata = args[:common_metadata] if args.key?(:common_metadata)
|
290
|
-
end
|
291
|
-
end
|
292
|
-
|
293
274
|
# The long running operation metadata for set default processor version method.
|
294
275
|
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata
|
295
276
|
include Google::Apis::Core::Hashable
|
@@ -360,12 +341,22 @@ module Google
|
|
360
341
|
class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation
|
361
342
|
include Google::Apis::Core::Hashable
|
362
343
|
|
344
|
+
# The total number of dataset errors.
|
345
|
+
# Corresponds to the JSON property `datasetErrorCount`
|
346
|
+
# @return [Fixnum]
|
347
|
+
attr_accessor :dataset_error_count
|
348
|
+
|
363
349
|
# Error information for the dataset as a whole. A maximum of 10 dataset errors
|
364
350
|
# will be returned. A single dataset error is terminal for training.
|
365
351
|
# Corresponds to the JSON property `datasetErrors`
|
366
352
|
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleRpcStatus>]
|
367
353
|
attr_accessor :dataset_errors
|
368
354
|
|
355
|
+
# The total number of document errors.
|
356
|
+
# Corresponds to the JSON property `documentErrorCount`
|
357
|
+
# @return [Fixnum]
|
358
|
+
attr_accessor :document_error_count
|
359
|
+
|
369
360
|
# Error information pertaining to specific documents. A maximum of 10 document
|
370
361
|
# errors will be returned. Any document with errors will not be used throughout
|
371
362
|
# training.
|
@@ -379,7 +370,9 @@ module Google
|
|
379
370
|
|
380
371
|
# Update properties of this object
|
381
372
|
def update!(**args)
|
373
|
+
@dataset_error_count = args[:dataset_error_count] if args.key?(:dataset_error_count)
|
382
374
|
@dataset_errors = args[:dataset_errors] if args.key?(:dataset_errors)
|
375
|
+
@document_error_count = args[:document_error_count] if args.key?(:document_error_count)
|
383
376
|
@document_errors = args[:document_errors] if args.key?(:document_errors)
|
384
377
|
end
|
385
378
|
end
|
@@ -1165,6 +1158,11 @@ module Google
|
|
1165
1158
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1BoundingPoly]
|
1166
1159
|
attr_accessor :bounding_poly
|
1167
1160
|
|
1161
|
+
# Optional. Confidence of detected page element, if applicable. Range [0, 1].
|
1162
|
+
# Corresponds to the JSON property `confidence`
|
1163
|
+
# @return [Float]
|
1164
|
+
attr_accessor :confidence
|
1165
|
+
|
1168
1166
|
# Optional. Deprecated. Use PageRef.bounding_poly instead.
|
1169
1167
|
# Corresponds to the JSON property `layoutId`
|
1170
1168
|
# @return [String]
|
@@ -1188,6 +1186,7 @@ module Google
|
|
1188
1186
|
# Update properties of this object
|
1189
1187
|
def update!(**args)
|
1190
1188
|
@bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
|
1189
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1191
1190
|
@layout_id = args[:layout_id] if args.key?(:layout_id)
|
1192
1191
|
@layout_type = args[:layout_type] if args.key?(:layout_type)
|
1193
1192
|
@page = args[:page] if args.key?(:page)
|
@@ -1742,6 +1741,12 @@ module Google
|
|
1742
1741
|
# @return [Fixnum]
|
1743
1742
|
attr_accessor :id
|
1744
1743
|
|
1744
|
+
# The index of the parent revisions corresponding collection of items (eg. list
|
1745
|
+
# of entities, properties within entities, etc.)
|
1746
|
+
# Corresponds to the JSON property `index`
|
1747
|
+
# @return [Fixnum]
|
1748
|
+
attr_accessor :index
|
1749
|
+
|
1745
1750
|
# The index of the [Document.revisions] identifying the parent revision.
|
1746
1751
|
# Corresponds to the JSON property `revision`
|
1747
1752
|
# @return [Fixnum]
|
@@ -1754,6 +1759,7 @@ module Google
|
|
1754
1759
|
# Update properties of this object
|
1755
1760
|
def update!(**args)
|
1756
1761
|
@id = args[:id] if args.key?(:id)
|
1762
|
+
@index = args[:index] if args.key?(:index)
|
1757
1763
|
@revision = args[:revision] if args.key?(:revision)
|
1758
1764
|
end
|
1759
1765
|
end
|
@@ -1876,98 +1882,98 @@ module Google
|
|
1876
1882
|
|
1877
1883
|
# Represents a color in the RGBA color space. This representation is designed
|
1878
1884
|
# for simplicity of conversion to/from color representations in various
|
1879
|
-
# languages over compactness
|
1880
|
-
# be trivially provided to the constructor of
|
1881
|
-
# also be trivially provided to UIColor's
|
1885
|
+
# languages over compactness. For example, the fields of this representation can
|
1886
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1887
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1882
1888
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1883
|
-
# CSS
|
1889
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1884
1890
|
# information about the absolute color space that should be used to interpret
|
1885
1891
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1886
|
-
# applications
|
1887
|
-
#
|
1888
|
-
#
|
1889
|
-
#
|
1890
|
-
#
|
1891
|
-
# protocolor.
|
1892
|
-
#
|
1893
|
-
#
|
1894
|
-
# float
|
1895
|
-
# float
|
1896
|
-
#
|
1897
|
-
#
|
1898
|
-
#
|
1899
|
-
#
|
1900
|
-
#
|
1901
|
-
#
|
1902
|
-
#
|
1903
|
-
#
|
1904
|
-
#
|
1905
|
-
#
|
1906
|
-
#
|
1907
|
-
#
|
1908
|
-
#
|
1909
|
-
#
|
1910
|
-
#
|
1892
|
+
# applications should assume the sRGB color space. When color equality needs to
|
1893
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
1894
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
1895
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
1896
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1897
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1898
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
1899
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
1900
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
1901
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
1902
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
1903
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
1904
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
1905
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
1906
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
1907
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
1908
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
1909
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
1910
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
1911
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
1912
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
1913
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
1914
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
1915
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
1916
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
1911
1917
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1912
1918
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1913
1919
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1914
|
-
#
|
1920
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1915
1921
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1916
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1917
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1918
|
-
#
|
1919
|
-
#
|
1920
|
-
#
|
1921
|
-
#
|
1922
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
1923
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
1924
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
1925
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
1926
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
1927
|
+
# / ...
|
1922
1928
|
# Corresponds to the JSON property `backgroundColor`
|
1923
1929
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
1924
1930
|
attr_accessor :background_color
|
1925
1931
|
|
1926
1932
|
# Represents a color in the RGBA color space. This representation is designed
|
1927
1933
|
# for simplicity of conversion to/from color representations in various
|
1928
|
-
# languages over compactness
|
1929
|
-
# be trivially provided to the constructor of
|
1930
|
-
# also be trivially provided to UIColor's
|
1934
|
+
# languages over compactness. For example, the fields of this representation can
|
1935
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1936
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1931
1937
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1932
|
-
# CSS
|
1938
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1933
1939
|
# information about the absolute color space that should be used to interpret
|
1934
1940
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1935
|
-
# applications
|
1936
|
-
#
|
1937
|
-
#
|
1938
|
-
#
|
1939
|
-
#
|
1940
|
-
# protocolor.
|
1941
|
-
#
|
1942
|
-
#
|
1943
|
-
# float
|
1944
|
-
# float
|
1945
|
-
#
|
1946
|
-
#
|
1947
|
-
#
|
1948
|
-
#
|
1949
|
-
#
|
1950
|
-
#
|
1951
|
-
#
|
1952
|
-
#
|
1953
|
-
#
|
1954
|
-
#
|
1955
|
-
#
|
1956
|
-
#
|
1957
|
-
#
|
1958
|
-
#
|
1959
|
-
#
|
1941
|
+
# applications should assume the sRGB color space. When color equality needs to
|
1942
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
1943
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
1944
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
1945
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1946
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1947
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
1948
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
1949
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
1950
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
1951
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
1952
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
1953
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
1954
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
1955
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
1956
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
1957
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
1958
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
1959
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
1960
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
1961
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
1962
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
1963
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
1964
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
1965
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
1960
1966
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1961
1967
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1962
1968
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1963
|
-
#
|
1969
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1964
1970
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1965
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1966
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1967
|
-
#
|
1968
|
-
#
|
1969
|
-
#
|
1970
|
-
#
|
1971
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
1972
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
1973
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
1974
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
1975
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
1976
|
+
# / ...
|
1971
1977
|
# Corresponds to the JSON property `color`
|
1972
1978
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
1973
1979
|
attr_accessor :color
|
@@ -2201,7 +2207,7 @@ module Google
|
|
2201
2207
|
# @return [Float]
|
2202
2208
|
attr_accessor :x
|
2203
2209
|
|
2204
|
-
# Y coordinate.
|
2210
|
+
# Y coordinate (starts from the top of the image).
|
2205
2211
|
# Corresponds to the JSON property `y`
|
2206
2212
|
# @return [Float]
|
2207
2213
|
attr_accessor :y
|
@@ -2322,7 +2328,7 @@ module Google
|
|
2322
2328
|
# @return [Fixnum]
|
2323
2329
|
attr_accessor :x
|
2324
2330
|
|
2325
|
-
# Y coordinate.
|
2331
|
+
# Y coordinate (starts from the top of the image).
|
2326
2332
|
# Corresponds to the JSON property `y`
|
2327
2333
|
# @return [Fixnum]
|
2328
2334
|
attr_accessor :y
|
@@ -2860,6 +2866,11 @@ module Google
|
|
2860
2866
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2BoundingPoly]
|
2861
2867
|
attr_accessor :bounding_poly
|
2862
2868
|
|
2869
|
+
# Optional. Confidence of detected page element, if applicable. Range [0, 1].
|
2870
|
+
# Corresponds to the JSON property `confidence`
|
2871
|
+
# @return [Float]
|
2872
|
+
attr_accessor :confidence
|
2873
|
+
|
2863
2874
|
# Optional. Deprecated. Use PageRef.bounding_poly instead.
|
2864
2875
|
# Corresponds to the JSON property `layoutId`
|
2865
2876
|
# @return [String]
|
@@ -2883,6 +2894,7 @@ module Google
|
|
2883
2894
|
# Update properties of this object
|
2884
2895
|
def update!(**args)
|
2885
2896
|
@bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
|
2897
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2886
2898
|
@layout_id = args[:layout_id] if args.key?(:layout_id)
|
2887
2899
|
@layout_type = args[:layout_type] if args.key?(:layout_type)
|
2888
2900
|
@page = args[:page] if args.key?(:page)
|
@@ -3437,6 +3449,12 @@ module Google
|
|
3437
3449
|
# @return [Fixnum]
|
3438
3450
|
attr_accessor :id
|
3439
3451
|
|
3452
|
+
# The index of the parent revisions corresponding collection of items (eg. list
|
3453
|
+
# of entities, properties within entities, etc.)
|
3454
|
+
# Corresponds to the JSON property `index`
|
3455
|
+
# @return [Fixnum]
|
3456
|
+
attr_accessor :index
|
3457
|
+
|
3440
3458
|
# The index of the [Document.revisions] identifying the parent revision.
|
3441
3459
|
# Corresponds to the JSON property `revision`
|
3442
3460
|
# @return [Fixnum]
|
@@ -3449,6 +3467,7 @@ module Google
|
|
3449
3467
|
# Update properties of this object
|
3450
3468
|
def update!(**args)
|
3451
3469
|
@id = args[:id] if args.key?(:id)
|
3470
|
+
@index = args[:index] if args.key?(:index)
|
3452
3471
|
@revision = args[:revision] if args.key?(:revision)
|
3453
3472
|
end
|
3454
3473
|
end
|
@@ -3571,98 +3590,98 @@ module Google
|
|
3571
3590
|
|
3572
3591
|
# Represents a color in the RGBA color space. This representation is designed
|
3573
3592
|
# for simplicity of conversion to/from color representations in various
|
3574
|
-
# languages over compactness
|
3575
|
-
# be trivially provided to the constructor of
|
3576
|
-
# also be trivially provided to UIColor's
|
3593
|
+
# languages over compactness. For example, the fields of this representation can
|
3594
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3595
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3577
3596
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3578
|
-
# CSS
|
3597
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3579
3598
|
# information about the absolute color space that should be used to interpret
|
3580
3599
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3581
|
-
# applications
|
3582
|
-
#
|
3583
|
-
#
|
3584
|
-
#
|
3585
|
-
#
|
3586
|
-
# protocolor.
|
3587
|
-
#
|
3588
|
-
#
|
3589
|
-
# float
|
3590
|
-
# float
|
3591
|
-
#
|
3592
|
-
#
|
3593
|
-
#
|
3594
|
-
#
|
3595
|
-
#
|
3596
|
-
#
|
3597
|
-
#
|
3598
|
-
#
|
3599
|
-
#
|
3600
|
-
#
|
3601
|
-
#
|
3602
|
-
#
|
3603
|
-
#
|
3604
|
-
#
|
3605
|
-
#
|
3600
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3601
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3602
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3603
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3604
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3605
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3606
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3607
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3608
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3609
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3610
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3611
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3612
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3613
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3614
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3615
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3616
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3617
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3618
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3619
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3620
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3621
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3622
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3623
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3624
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3606
3625
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3607
3626
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3608
3627
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3609
|
-
#
|
3628
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3610
3629
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3611
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3612
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3613
|
-
#
|
3614
|
-
#
|
3615
|
-
#
|
3616
|
-
#
|
3630
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3631
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3632
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3633
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3634
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3635
|
+
# / ...
|
3617
3636
|
# Corresponds to the JSON property `backgroundColor`
|
3618
3637
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
3619
3638
|
attr_accessor :background_color
|
3620
3639
|
|
3621
3640
|
# Represents a color in the RGBA color space. This representation is designed
|
3622
3641
|
# for simplicity of conversion to/from color representations in various
|
3623
|
-
# languages over compactness
|
3624
|
-
# be trivially provided to the constructor of
|
3625
|
-
# also be trivially provided to UIColor's
|
3642
|
+
# languages over compactness. For example, the fields of this representation can
|
3643
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3644
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3626
3645
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3627
|
-
# CSS
|
3646
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3628
3647
|
# information about the absolute color space that should be used to interpret
|
3629
3648
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3630
|
-
# applications
|
3631
|
-
#
|
3632
|
-
#
|
3633
|
-
#
|
3634
|
-
#
|
3635
|
-
# protocolor.
|
3636
|
-
#
|
3637
|
-
#
|
3638
|
-
# float
|
3639
|
-
# float
|
3640
|
-
#
|
3641
|
-
#
|
3642
|
-
#
|
3643
|
-
#
|
3644
|
-
#
|
3645
|
-
#
|
3646
|
-
#
|
3647
|
-
#
|
3648
|
-
#
|
3649
|
-
#
|
3650
|
-
#
|
3651
|
-
#
|
3652
|
-
#
|
3653
|
-
#
|
3654
|
-
#
|
3649
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3650
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3651
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3652
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3653
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3654
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3655
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3656
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3657
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3658
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3659
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3660
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3661
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3662
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3663
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3664
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3665
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3666
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3667
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3668
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3669
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3670
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3671
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3672
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3673
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3655
3674
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3656
3675
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3657
3676
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3658
|
-
#
|
3677
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3659
3678
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3660
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3661
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3662
|
-
#
|
3663
|
-
#
|
3664
|
-
#
|
3665
|
-
#
|
3679
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3680
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3681
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3682
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3683
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3684
|
+
# / ...
|
3666
3685
|
# Corresponds to the JSON property `color`
|
3667
3686
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
3668
3687
|
attr_accessor :color
|
@@ -3906,7 +3925,7 @@ module Google
|
|
3906
3925
|
# @return [Float]
|
3907
3926
|
attr_accessor :x
|
3908
3927
|
|
3909
|
-
# Y coordinate.
|
3928
|
+
# Y coordinate (starts from the top of the image).
|
3910
3929
|
# Corresponds to the JSON property `y`
|
3911
3930
|
# @return [Float]
|
3912
3931
|
attr_accessor :y
|
@@ -4027,7 +4046,7 @@ module Google
|
|
4027
4046
|
# @return [Fixnum]
|
4028
4047
|
attr_accessor :x
|
4029
4048
|
|
4030
|
-
# Y coordinate.
|
4049
|
+
# Y coordinate (starts from the top of the image).
|
4031
4050
|
# Corresponds to the JSON property `y`
|
4032
4051
|
# @return [Fixnum]
|
4033
4052
|
attr_accessor :y
|
@@ -4334,6 +4353,71 @@ module Google
|
|
4334
4353
|
end
|
4335
4354
|
end
|
4336
4355
|
|
4356
|
+
# The long running operation metadata for delete processor method.
|
4357
|
+
class GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata
|
4358
|
+
include Google::Apis::Core::Hashable
|
4359
|
+
|
4360
|
+
# The common metadata for long running operations.
|
4361
|
+
# Corresponds to the JSON property `commonMetadata`
|
4362
|
+
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3CommonOperationMetadata]
|
4363
|
+
attr_accessor :common_metadata
|
4364
|
+
|
4365
|
+
def initialize(**args)
|
4366
|
+
update!(**args)
|
4367
|
+
end
|
4368
|
+
|
4369
|
+
# Update properties of this object
|
4370
|
+
def update!(**args)
|
4371
|
+
@common_metadata = args[:common_metadata] if args.key?(:common_metadata)
|
4372
|
+
end
|
4373
|
+
end
|
4374
|
+
|
4375
|
+
# The long running operation metadata for disable processor method.
|
4376
|
+
class GoogleCloudDocumentaiV1beta3DisableProcessorMetadata
|
4377
|
+
include Google::Apis::Core::Hashable
|
4378
|
+
|
4379
|
+
# The common metadata for long running operations.
|
4380
|
+
# Corresponds to the JSON property `commonMetadata`
|
4381
|
+
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3CommonOperationMetadata]
|
4382
|
+
attr_accessor :common_metadata
|
4383
|
+
|
4384
|
+
def initialize(**args)
|
4385
|
+
update!(**args)
|
4386
|
+
end
|
4387
|
+
|
4388
|
+
# Update properties of this object
|
4389
|
+
def update!(**args)
|
4390
|
+
@common_metadata = args[:common_metadata] if args.key?(:common_metadata)
|
4391
|
+
end
|
4392
|
+
end
|
4393
|
+
|
4394
|
+
# Request message for the disable processor method.
|
4395
|
+
class GoogleCloudDocumentaiV1beta3DisableProcessorRequest
|
4396
|
+
include Google::Apis::Core::Hashable
|
4397
|
+
|
4398
|
+
def initialize(**args)
|
4399
|
+
update!(**args)
|
4400
|
+
end
|
4401
|
+
|
4402
|
+
# Update properties of this object
|
4403
|
+
def update!(**args)
|
4404
|
+
end
|
4405
|
+
end
|
4406
|
+
|
4407
|
+
# Response message for the disable processor method. Intentionally empty proto
|
4408
|
+
# for adding fields in future.
|
4409
|
+
class GoogleCloudDocumentaiV1beta3DisableProcessorResponse
|
4410
|
+
include Google::Apis::Core::Hashable
|
4411
|
+
|
4412
|
+
def initialize(**args)
|
4413
|
+
update!(**args)
|
4414
|
+
end
|
4415
|
+
|
4416
|
+
# Update properties of this object
|
4417
|
+
def update!(**args)
|
4418
|
+
end
|
4419
|
+
end
|
4420
|
+
|
4337
4421
|
# Document represents the canonical document resource in Document Understanding
|
4338
4422
|
# AI. It is an interchange format that provides insights into documents and
|
4339
4423
|
# allows for collaboration between users and Document Understanding AI to
|
@@ -4807,6 +4891,11 @@ module Google
|
|
4807
4891
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3BoundingPoly]
|
4808
4892
|
attr_accessor :bounding_poly
|
4809
4893
|
|
4894
|
+
# Optional. Confidence of detected page element, if applicable. Range [0, 1].
|
4895
|
+
# Corresponds to the JSON property `confidence`
|
4896
|
+
# @return [Float]
|
4897
|
+
attr_accessor :confidence
|
4898
|
+
|
4810
4899
|
# Optional. Deprecated. Use PageRef.bounding_poly instead.
|
4811
4900
|
# Corresponds to the JSON property `layoutId`
|
4812
4901
|
# @return [String]
|
@@ -4830,6 +4919,7 @@ module Google
|
|
4830
4919
|
# Update properties of this object
|
4831
4920
|
def update!(**args)
|
4832
4921
|
@bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
|
4922
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
4833
4923
|
@layout_id = args[:layout_id] if args.key?(:layout_id)
|
4834
4924
|
@layout_type = args[:layout_type] if args.key?(:layout_type)
|
4835
4925
|
@page = args[:page] if args.key?(:page)
|
@@ -5384,6 +5474,12 @@ module Google
|
|
5384
5474
|
# @return [Fixnum]
|
5385
5475
|
attr_accessor :id
|
5386
5476
|
|
5477
|
+
# The index of the parent revisions corresponding collection of items (eg. list
|
5478
|
+
# of entities, properties within entities, etc.)
|
5479
|
+
# Corresponds to the JSON property `index`
|
5480
|
+
# @return [Fixnum]
|
5481
|
+
attr_accessor :index
|
5482
|
+
|
5387
5483
|
# The index of the [Document.revisions] identifying the parent revision.
|
5388
5484
|
# Corresponds to the JSON property `revision`
|
5389
5485
|
# @return [Fixnum]
|
@@ -5396,6 +5492,7 @@ module Google
|
|
5396
5492
|
# Update properties of this object
|
5397
5493
|
def update!(**args)
|
5398
5494
|
@id = args[:id] if args.key?(:id)
|
5495
|
+
@index = args[:index] if args.key?(:index)
|
5399
5496
|
@revision = args[:revision] if args.key?(:revision)
|
5400
5497
|
end
|
5401
5498
|
end
|
@@ -5518,98 +5615,98 @@ module Google
|
|
5518
5615
|
|
5519
5616
|
# Represents a color in the RGBA color space. This representation is designed
|
5520
5617
|
# for simplicity of conversion to/from color representations in various
|
5521
|
-
# languages over compactness
|
5522
|
-
# be trivially provided to the constructor of
|
5523
|
-
# also be trivially provided to UIColor's
|
5618
|
+
# languages over compactness. For example, the fields of this representation can
|
5619
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5620
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5524
5621
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5525
|
-
# CSS
|
5622
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5526
5623
|
# information about the absolute color space that should be used to interpret
|
5527
5624
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
5528
|
-
# applications
|
5529
|
-
#
|
5530
|
-
#
|
5531
|
-
#
|
5532
|
-
#
|
5533
|
-
# protocolor.
|
5534
|
-
#
|
5535
|
-
#
|
5536
|
-
# float
|
5537
|
-
# float
|
5538
|
-
#
|
5539
|
-
#
|
5540
|
-
#
|
5541
|
-
#
|
5542
|
-
#
|
5543
|
-
#
|
5544
|
-
#
|
5545
|
-
#
|
5546
|
-
#
|
5547
|
-
#
|
5548
|
-
#
|
5549
|
-
#
|
5550
|
-
#
|
5551
|
-
#
|
5552
|
-
#
|
5625
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5626
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5627
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5628
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5629
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5630
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5631
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5632
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5633
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5634
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5635
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5636
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5637
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5638
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5639
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5640
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5641
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5642
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5643
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5644
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5645
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5646
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5647
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5648
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5649
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5553
5650
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5554
5651
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5555
5652
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5556
|
-
#
|
5653
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5557
5654
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
5558
|
-
# ', alphaFrac, ')'].join(''); `; var
|
5559
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
5560
|
-
#
|
5561
|
-
#
|
5562
|
-
#
|
5563
|
-
#
|
5655
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5656
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5657
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5658
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5659
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5660
|
+
# / ...
|
5564
5661
|
# Corresponds to the JSON property `backgroundColor`
|
5565
5662
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
5566
5663
|
attr_accessor :background_color
|
5567
5664
|
|
5568
5665
|
# Represents a color in the RGBA color space. This representation is designed
|
5569
5666
|
# for simplicity of conversion to/from color representations in various
|
5570
|
-
# languages over compactness
|
5571
|
-
# be trivially provided to the constructor of
|
5572
|
-
# also be trivially provided to UIColor's
|
5667
|
+
# languages over compactness. For example, the fields of this representation can
|
5668
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5669
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5573
5670
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5574
|
-
# CSS
|
5671
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5575
5672
|
# information about the absolute color space that should be used to interpret
|
5576
5673
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
5577
|
-
# applications
|
5578
|
-
#
|
5579
|
-
#
|
5580
|
-
#
|
5581
|
-
#
|
5582
|
-
# protocolor.
|
5583
|
-
#
|
5584
|
-
#
|
5585
|
-
# float
|
5586
|
-
# float
|
5587
|
-
#
|
5588
|
-
#
|
5589
|
-
#
|
5590
|
-
#
|
5591
|
-
#
|
5592
|
-
#
|
5593
|
-
#
|
5594
|
-
#
|
5595
|
-
#
|
5596
|
-
#
|
5597
|
-
#
|
5598
|
-
#
|
5599
|
-
#
|
5600
|
-
#
|
5601
|
-
#
|
5674
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5675
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5676
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5677
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5678
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5679
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5680
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5681
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5682
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5683
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5684
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5685
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5686
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5687
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5688
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5689
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5690
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5691
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5692
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5693
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5694
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5695
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5696
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5697
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5698
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5602
5699
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5603
5700
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5604
5701
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5605
|
-
#
|
5702
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5606
5703
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
5607
|
-
# ', alphaFrac, ')'].join(''); `; var
|
5608
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
5609
|
-
#
|
5610
|
-
#
|
5611
|
-
#
|
5612
|
-
#
|
5704
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5705
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5706
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5707
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5708
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5709
|
+
# / ...
|
5613
5710
|
# Corresponds to the JSON property `color`
|
5614
5711
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
5615
5712
|
attr_accessor :color
|
@@ -5767,6 +5864,71 @@ module Google
|
|
5767
5864
|
end
|
5768
5865
|
end
|
5769
5866
|
|
5867
|
+
# The long running operation metadata for enable processor method.
|
5868
|
+
class GoogleCloudDocumentaiV1beta3EnableProcessorMetadata
|
5869
|
+
include Google::Apis::Core::Hashable
|
5870
|
+
|
5871
|
+
# The common metadata for long running operations.
|
5872
|
+
# Corresponds to the JSON property `commonMetadata`
|
5873
|
+
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3CommonOperationMetadata]
|
5874
|
+
attr_accessor :common_metadata
|
5875
|
+
|
5876
|
+
def initialize(**args)
|
5877
|
+
update!(**args)
|
5878
|
+
end
|
5879
|
+
|
5880
|
+
# Update properties of this object
|
5881
|
+
def update!(**args)
|
5882
|
+
@common_metadata = args[:common_metadata] if args.key?(:common_metadata)
|
5883
|
+
end
|
5884
|
+
end
|
5885
|
+
|
5886
|
+
# Request message for the enable processor method.
|
5887
|
+
class GoogleCloudDocumentaiV1beta3EnableProcessorRequest
|
5888
|
+
include Google::Apis::Core::Hashable
|
5889
|
+
|
5890
|
+
def initialize(**args)
|
5891
|
+
update!(**args)
|
5892
|
+
end
|
5893
|
+
|
5894
|
+
# Update properties of this object
|
5895
|
+
def update!(**args)
|
5896
|
+
end
|
5897
|
+
end
|
5898
|
+
|
5899
|
+
# Response message for the enable processor method. Intentionally empty proto
|
5900
|
+
# for adding fields in future.
|
5901
|
+
class GoogleCloudDocumentaiV1beta3EnableProcessorResponse
|
5902
|
+
include Google::Apis::Core::Hashable
|
5903
|
+
|
5904
|
+
def initialize(**args)
|
5905
|
+
update!(**args)
|
5906
|
+
end
|
5907
|
+
|
5908
|
+
# Update properties of this object
|
5909
|
+
def update!(**args)
|
5910
|
+
end
|
5911
|
+
end
|
5912
|
+
|
5913
|
+
# Response message for fetch processor types.
|
5914
|
+
class GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse
|
5915
|
+
include Google::Apis::Core::Hashable
|
5916
|
+
|
5917
|
+
# The list of processor types.
|
5918
|
+
# Corresponds to the JSON property `processorTypes`
|
5919
|
+
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorType>]
|
5920
|
+
attr_accessor :processor_types
|
5921
|
+
|
5922
|
+
def initialize(**args)
|
5923
|
+
update!(**args)
|
5924
|
+
end
|
5925
|
+
|
5926
|
+
# Update properties of this object
|
5927
|
+
def update!(**args)
|
5928
|
+
@processor_types = args[:processor_types] if args.key?(:processor_types)
|
5929
|
+
end
|
5930
|
+
end
|
5931
|
+
|
5770
5932
|
# Specifies a document stored on Cloud Storage.
|
5771
5933
|
class GoogleCloudDocumentaiV1beta3GcsDocument
|
5772
5934
|
include Google::Apis::Core::Hashable
|
@@ -5864,6 +6026,31 @@ module Google
|
|
5864
6026
|
end
|
5865
6027
|
end
|
5866
6028
|
|
6029
|
+
# Response message for list processors.
|
6030
|
+
class GoogleCloudDocumentaiV1beta3ListProcessorsResponse
|
6031
|
+
include Google::Apis::Core::Hashable
|
6032
|
+
|
6033
|
+
# Points to the next processor, otherwise empty.
|
6034
|
+
# Corresponds to the JSON property `nextPageToken`
|
6035
|
+
# @return [String]
|
6036
|
+
attr_accessor :next_page_token
|
6037
|
+
|
6038
|
+
# The list of processors.
|
6039
|
+
# Corresponds to the JSON property `processors`
|
6040
|
+
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor>]
|
6041
|
+
attr_accessor :processors
|
6042
|
+
|
6043
|
+
def initialize(**args)
|
6044
|
+
update!(**args)
|
6045
|
+
end
|
6046
|
+
|
6047
|
+
# Update properties of this object
|
6048
|
+
def update!(**args)
|
6049
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
6050
|
+
@processors = args[:processors] if args.key?(:processors)
|
6051
|
+
end
|
6052
|
+
end
|
6053
|
+
|
5867
6054
|
# A vertex represents a 2D point in the image. NOTE: the normalized vertex
|
5868
6055
|
# coordinates are relative to the original image and range from 0 to 1.
|
5869
6056
|
class GoogleCloudDocumentaiV1beta3NormalizedVertex
|
@@ -5874,7 +6061,7 @@ module Google
|
|
5874
6061
|
# @return [Float]
|
5875
6062
|
attr_accessor :x
|
5876
6063
|
|
5877
|
-
# Y coordinate.
|
6064
|
+
# Y coordinate (starts from the top of the image).
|
5878
6065
|
# Corresponds to the JSON property `y`
|
5879
6066
|
# @return [Float]
|
5880
6067
|
attr_accessor :y
|
@@ -5972,6 +6159,158 @@ module Google
|
|
5972
6159
|
end
|
5973
6160
|
end
|
5974
6161
|
|
6162
|
+
# The first-class citizen for DAI. Each processor defines how to extract
|
6163
|
+
# structural information from a document.
|
6164
|
+
class GoogleCloudDocumentaiV1beta3Processor
|
6165
|
+
include Google::Apis::Core::Hashable
|
6166
|
+
|
6167
|
+
# The time the processor was created.
|
6168
|
+
# Corresponds to the JSON property `createTime`
|
6169
|
+
# @return [String]
|
6170
|
+
attr_accessor :create_time
|
6171
|
+
|
6172
|
+
# The default processor version.
|
6173
|
+
# Corresponds to the JSON property `defaultProcessorVersion`
|
6174
|
+
# @return [String]
|
6175
|
+
attr_accessor :default_processor_version
|
6176
|
+
|
6177
|
+
# The display name of the processor.
|
6178
|
+
# Corresponds to the JSON property `displayName`
|
6179
|
+
# @return [String]
|
6180
|
+
attr_accessor :display_name
|
6181
|
+
|
6182
|
+
# The KMS key used for encryption/decryption in CMEK scenarios. See https://
|
6183
|
+
# cloud.google.com/security-key-management.
|
6184
|
+
# Corresponds to the JSON property `kmsKeyName`
|
6185
|
+
# @return [String]
|
6186
|
+
attr_accessor :kms_key_name
|
6187
|
+
|
6188
|
+
# Output only. Immutable. The resource name of the processor. Format: projects/`
|
6189
|
+
# project`/locations/`location`/processors/`processor`
|
6190
|
+
# Corresponds to the JSON property `name`
|
6191
|
+
# @return [String]
|
6192
|
+
attr_accessor :name
|
6193
|
+
|
6194
|
+
# Output only. Immutable. The http endpoint that can be called to invoke
|
6195
|
+
# processing.
|
6196
|
+
# Corresponds to the JSON property `processEndpoint`
|
6197
|
+
# @return [String]
|
6198
|
+
attr_accessor :process_endpoint
|
6199
|
+
|
6200
|
+
# Output only. The state of the processor.
|
6201
|
+
# Corresponds to the JSON property `state`
|
6202
|
+
# @return [String]
|
6203
|
+
attr_accessor :state
|
6204
|
+
|
6205
|
+
# The processor type, e.g., INVOICE_PARSING, W2_PARSING, etc.
|
6206
|
+
# Corresponds to the JSON property `type`
|
6207
|
+
# @return [String]
|
6208
|
+
attr_accessor :type
|
6209
|
+
|
6210
|
+
def initialize(**args)
|
6211
|
+
update!(**args)
|
6212
|
+
end
|
6213
|
+
|
6214
|
+
# Update properties of this object
|
6215
|
+
def update!(**args)
|
6216
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
6217
|
+
@default_processor_version = args[:default_processor_version] if args.key?(:default_processor_version)
|
6218
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
6219
|
+
@kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
|
6220
|
+
@name = args[:name] if args.key?(:name)
|
6221
|
+
@process_endpoint = args[:process_endpoint] if args.key?(:process_endpoint)
|
6222
|
+
@state = args[:state] if args.key?(:state)
|
6223
|
+
@type = args[:type] if args.key?(:type)
|
6224
|
+
end
|
6225
|
+
end
|
6226
|
+
|
6227
|
+
# A processor type is responsible for performing a certain document
|
6228
|
+
# understanding task on a certain type of document. All processor types are
|
6229
|
+
# created by the documentai service internally. User will only list all
|
6230
|
+
# available processor types via UI. For different users (projects), the
|
6231
|
+
# available processor types may be different since we'll expose the access of
|
6232
|
+
# some types via EAP whitelisting. We make the ProcessorType a resource under
|
6233
|
+
# location so we have a unified API and keep the possibility that UI will load
|
6234
|
+
# different available processor types from different regions. But for alpha the
|
6235
|
+
# behavior is that the user will always get the union of all available processor
|
6236
|
+
# types among all regions no matter which regionalized endpoint is called, and
|
6237
|
+
# then we use the 'available_locations' field to show under which regions a
|
6238
|
+
# processor type is available. For example, users can call either the 'US' or '
|
6239
|
+
# EU' endpoint to feach processor types. In the return, we will have an 'invoice
|
6240
|
+
# parsing' processor with 'available_locations' field only containing 'US'. So
|
6241
|
+
# the user can try to create an 'invoice parsing' processor under the location '
|
6242
|
+
# US'. Such attempt of creating under the location 'EU' will fail. Next ID: 7.
|
6243
|
+
class GoogleCloudDocumentaiV1beta3ProcessorType
|
6244
|
+
include Google::Apis::Core::Hashable
|
6245
|
+
|
6246
|
+
# Whether the processor type allows creation. If yes, user can create a
|
6247
|
+
# processor of this processor type. Otherwise, user needs to require for
|
6248
|
+
# whitelisting.
|
6249
|
+
# Corresponds to the JSON property `allowCreation`
|
6250
|
+
# @return [Boolean]
|
6251
|
+
attr_accessor :allow_creation
|
6252
|
+
alias_method :allow_creation?, :allow_creation
|
6253
|
+
|
6254
|
+
# The locations in which this processor is available.
|
6255
|
+
# Corresponds to the JSON property `availableLocations`
|
6256
|
+
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorTypeLocationInfo>]
|
6257
|
+
attr_accessor :available_locations
|
6258
|
+
|
6259
|
+
# The processor category, used by UI to group processor types.
|
6260
|
+
# Corresponds to the JSON property `category`
|
6261
|
+
# @return [String]
|
6262
|
+
attr_accessor :category
|
6263
|
+
|
6264
|
+
# The resource name of the processor type. Format: projects/`project`/
|
6265
|
+
# processorTypes/`processor_type`
|
6266
|
+
# Corresponds to the JSON property `name`
|
6267
|
+
# @return [String]
|
6268
|
+
attr_accessor :name
|
6269
|
+
|
6270
|
+
# The schema defines the output of the processed document by a processor.
|
6271
|
+
# Corresponds to the JSON property `schema`
|
6272
|
+
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Schema]
|
6273
|
+
attr_accessor :schema
|
6274
|
+
|
6275
|
+
# The type of the processor, e.g, "invoice_parsing".
|
6276
|
+
# Corresponds to the JSON property `type`
|
6277
|
+
# @return [String]
|
6278
|
+
attr_accessor :type
|
6279
|
+
|
6280
|
+
def initialize(**args)
|
6281
|
+
update!(**args)
|
6282
|
+
end
|
6283
|
+
|
6284
|
+
# Update properties of this object
|
6285
|
+
def update!(**args)
|
6286
|
+
@allow_creation = args[:allow_creation] if args.key?(:allow_creation)
|
6287
|
+
@available_locations = args[:available_locations] if args.key?(:available_locations)
|
6288
|
+
@category = args[:category] if args.key?(:category)
|
6289
|
+
@name = args[:name] if args.key?(:name)
|
6290
|
+
@schema = args[:schema] if args.key?(:schema)
|
6291
|
+
@type = args[:type] if args.key?(:type)
|
6292
|
+
end
|
6293
|
+
end
|
6294
|
+
|
6295
|
+
# The location information about where the processor is available.
|
6296
|
+
class GoogleCloudDocumentaiV1beta3ProcessorTypeLocationInfo
|
6297
|
+
include Google::Apis::Core::Hashable
|
6298
|
+
|
6299
|
+
# The location id, currently must be one of [us, eu].
|
6300
|
+
# Corresponds to the JSON property `locationId`
|
6301
|
+
# @return [String]
|
6302
|
+
attr_accessor :location_id
|
6303
|
+
|
6304
|
+
def initialize(**args)
|
6305
|
+
update!(**args)
|
6306
|
+
end
|
6307
|
+
|
6308
|
+
# Update properties of this object
|
6309
|
+
def update!(**args)
|
6310
|
+
@location_id = args[:location_id] if args.key?(:location_id)
|
6311
|
+
end
|
6312
|
+
end
|
6313
|
+
|
5975
6314
|
# Payload message of raw document content (bytes).
|
5976
6315
|
class GoogleCloudDocumentaiV1beta3RawDocument
|
5977
6316
|
include Google::Apis::Core::Hashable
|
@@ -6042,7 +6381,7 @@ module Google
|
|
6042
6381
|
end
|
6043
6382
|
end
|
6044
6383
|
|
6045
|
-
# Request message for review document method.
|
6384
|
+
# Request message for review document method. Next Id: 5.
|
6046
6385
|
class GoogleCloudDocumentaiV1beta3ReviewDocumentRequest
|
6047
6386
|
include Google::Apis::Core::Hashable
|
6048
6387
|
|
@@ -6054,6 +6393,12 @@ module Google
|
|
6054
6393
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Document]
|
6055
6394
|
attr_accessor :document
|
6056
6395
|
|
6396
|
+
# Whether the validation should be performed on the ad-hoc review request.
|
6397
|
+
# Corresponds to the JSON property `enableSchemaValidation`
|
6398
|
+
# @return [Boolean]
|
6399
|
+
attr_accessor :enable_schema_validation
|
6400
|
+
alias_method :enable_schema_validation?, :enable_schema_validation
|
6401
|
+
|
6057
6402
|
# Document represents the canonical document resource in Document Understanding
|
6058
6403
|
# AI. It is an interchange format that provides insights into documents and
|
6059
6404
|
# allows for collaboration between users and Document Understanding AI to
|
@@ -6069,6 +6414,7 @@ module Google
|
|
6069
6414
|
# Update properties of this object
|
6070
6415
|
def update!(**args)
|
6071
6416
|
@document = args[:document] if args.key?(:document)
|
6417
|
+
@enable_schema_validation = args[:enable_schema_validation] if args.key?(:enable_schema_validation)
|
6072
6418
|
@inline_document = args[:inline_document] if args.key?(:inline_document)
|
6073
6419
|
end
|
6074
6420
|
end
|
@@ -6092,6 +6438,105 @@ module Google
|
|
6092
6438
|
end
|
6093
6439
|
end
|
6094
6440
|
|
6441
|
+
# The schema defines the output of the processed document by a processor.
|
6442
|
+
class GoogleCloudDocumentaiV1beta3Schema
|
6443
|
+
include Google::Apis::Core::Hashable
|
6444
|
+
|
6445
|
+
# Description of the schema.
|
6446
|
+
# Corresponds to the JSON property `description`
|
6447
|
+
# @return [String]
|
6448
|
+
attr_accessor :description
|
6449
|
+
|
6450
|
+
# Display name to show to users.
|
6451
|
+
# Corresponds to the JSON property `displayName`
|
6452
|
+
# @return [String]
|
6453
|
+
attr_accessor :display_name
|
6454
|
+
|
6455
|
+
# Entity types of the schema.
|
6456
|
+
# Corresponds to the JSON property `entityTypes`
|
6457
|
+
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaEntityType>]
|
6458
|
+
attr_accessor :entity_types
|
6459
|
+
|
6460
|
+
def initialize(**args)
|
6461
|
+
update!(**args)
|
6462
|
+
end
|
6463
|
+
|
6464
|
+
# Update properties of this object
|
6465
|
+
def update!(**args)
|
6466
|
+
@description = args[:description] if args.key?(:description)
|
6467
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
6468
|
+
@entity_types = args[:entity_types] if args.key?(:entity_types)
|
6469
|
+
end
|
6470
|
+
end
|
6471
|
+
|
6472
|
+
# EntityType is the wrapper of a label of the corresponding model with detailed
|
6473
|
+
# attributes and limitations for entity-based processors. Multiple types can
|
6474
|
+
# also compose a dependency tree to represent nested types.
|
6475
|
+
class GoogleCloudDocumentaiV1beta3SchemaEntityType
|
6476
|
+
include Google::Apis::Core::Hashable
|
6477
|
+
|
6478
|
+
# Type of the entity. It must be one of the following: `document` - the entity
|
6479
|
+
# represents a classification of a logical document. `object` - if the entity
|
6480
|
+
# has properties it is likely an object (or or a document.) `datetime` - the
|
6481
|
+
# entity is a date or time value. `money` - the entity represents a money value
|
6482
|
+
# amount. `number` - the entity is a number - integer or floating point. `string`
|
6483
|
+
# - the entity is a string value. `boolean` - the entity is a boolean value. `
|
6484
|
+
# address` - the entity is a location address.
|
6485
|
+
# Corresponds to the JSON property `baseType`
|
6486
|
+
# @return [String]
|
6487
|
+
attr_accessor :base_type
|
6488
|
+
|
6489
|
+
# Description of the entity type.
|
6490
|
+
# Corresponds to the JSON property `description`
|
6491
|
+
# @return [String]
|
6492
|
+
attr_accessor :description
|
6493
|
+
|
6494
|
+
# If specified, lists all the possible values for this entity.
|
6495
|
+
# Corresponds to the JSON property `enumValues`
|
6496
|
+
# @return [Array<String>]
|
6497
|
+
attr_accessor :enum_values
|
6498
|
+
|
6499
|
+
# Occurrence type limits the number of times an entity type appears in the
|
6500
|
+
# document.
|
6501
|
+
# Corresponds to the JSON property `occurrenceType`
|
6502
|
+
# @return [String]
|
6503
|
+
attr_accessor :occurrence_type
|
6504
|
+
|
6505
|
+
# Describing the nested structure of an entity. An EntityType may consist of
|
6506
|
+
# several other EntityTypes. For example, in a document there can be an
|
6507
|
+
# EntityType 'ID', which consists of EntityType 'name' and 'address', with
|
6508
|
+
# corresponding attributes, such as TEXT for both types and ONCE for occurrence
|
6509
|
+
# types.
|
6510
|
+
# Corresponds to the JSON property `properties`
|
6511
|
+
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaEntityType>]
|
6512
|
+
attr_accessor :properties
|
6513
|
+
|
6514
|
+
# Source of this entity type.
|
6515
|
+
# Corresponds to the JSON property `source`
|
6516
|
+
# @return [String]
|
6517
|
+
attr_accessor :source
|
6518
|
+
|
6519
|
+
# Name of the type. It must be unique within the set of same level types.
|
6520
|
+
# Corresponds to the JSON property `type`
|
6521
|
+
# @return [String]
|
6522
|
+
attr_accessor :type
|
6523
|
+
|
6524
|
+
def initialize(**args)
|
6525
|
+
update!(**args)
|
6526
|
+
end
|
6527
|
+
|
6528
|
+
# Update properties of this object
|
6529
|
+
def update!(**args)
|
6530
|
+
@base_type = args[:base_type] if args.key?(:base_type)
|
6531
|
+
@description = args[:description] if args.key?(:description)
|
6532
|
+
@enum_values = args[:enum_values] if args.key?(:enum_values)
|
6533
|
+
@occurrence_type = args[:occurrence_type] if args.key?(:occurrence_type)
|
6534
|
+
@properties = args[:properties] if args.key?(:properties)
|
6535
|
+
@source = args[:source] if args.key?(:source)
|
6536
|
+
@type = args[:type] if args.key?(:type)
|
6537
|
+
end
|
6538
|
+
end
|
6539
|
+
|
6095
6540
|
# A vertex represents a 2D point in the image. NOTE: the vertex coordinates are
|
6096
6541
|
# in the same scale as the original image.
|
6097
6542
|
class GoogleCloudDocumentaiV1beta3Vertex
|
@@ -6102,7 +6547,7 @@ module Google
|
|
6102
6547
|
# @return [Fixnum]
|
6103
6548
|
attr_accessor :x
|
6104
6549
|
|
6105
|
-
# Y coordinate.
|
6550
|
+
# Y coordinate (starts from the top of the image).
|
6106
6551
|
# Corresponds to the JSON property `y`
|
6107
6552
|
# @return [Fixnum]
|
6108
6553
|
attr_accessor :y
|
@@ -6190,6 +6635,31 @@ module Google
|
|
6190
6635
|
end
|
6191
6636
|
end
|
6192
6637
|
|
6638
|
+
# The response message for Operations.ListOperations.
|
6639
|
+
class GoogleLongrunningListOperationsResponse
|
6640
|
+
include Google::Apis::Core::Hashable
|
6641
|
+
|
6642
|
+
# The standard List next-page token.
|
6643
|
+
# Corresponds to the JSON property `nextPageToken`
|
6644
|
+
# @return [String]
|
6645
|
+
attr_accessor :next_page_token
|
6646
|
+
|
6647
|
+
# A list of operations that matches the specified filter in the request.
|
6648
|
+
# Corresponds to the JSON property `operations`
|
6649
|
+
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation>]
|
6650
|
+
attr_accessor :operations
|
6651
|
+
|
6652
|
+
def initialize(**args)
|
6653
|
+
update!(**args)
|
6654
|
+
end
|
6655
|
+
|
6656
|
+
# Update properties of this object
|
6657
|
+
def update!(**args)
|
6658
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
6659
|
+
@operations = args[:operations] if args.key?(:operations)
|
6660
|
+
end
|
6661
|
+
end
|
6662
|
+
|
6193
6663
|
# This resource represents a long-running operation that is the result of a
|
6194
6664
|
# network API call.
|
6195
6665
|
class GoogleLongrunningOperation
|
@@ -6310,61 +6780,60 @@ module Google
|
|
6310
6780
|
|
6311
6781
|
# Represents a color in the RGBA color space. This representation is designed
|
6312
6782
|
# for simplicity of conversion to/from color representations in various
|
6313
|
-
# languages over compactness
|
6314
|
-
# be trivially provided to the constructor of
|
6315
|
-
# also be trivially provided to UIColor's
|
6783
|
+
# languages over compactness. For example, the fields of this representation can
|
6784
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6785
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6316
6786
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6317
|
-
# CSS
|
6787
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6318
6788
|
# information about the absolute color space that should be used to interpret
|
6319
6789
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6320
|
-
# applications
|
6321
|
-
#
|
6322
|
-
#
|
6323
|
-
#
|
6324
|
-
#
|
6325
|
-
# protocolor.
|
6326
|
-
#
|
6327
|
-
#
|
6328
|
-
# float
|
6329
|
-
# float
|
6330
|
-
#
|
6331
|
-
#
|
6332
|
-
#
|
6333
|
-
#
|
6334
|
-
#
|
6335
|
-
#
|
6336
|
-
#
|
6337
|
-
#
|
6338
|
-
#
|
6339
|
-
#
|
6340
|
-
#
|
6341
|
-
#
|
6342
|
-
#
|
6343
|
-
#
|
6344
|
-
#
|
6790
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6791
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6792
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6793
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6794
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6795
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6796
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6797
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6798
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6799
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6800
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6801
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6802
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6803
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6804
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6805
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6806
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6807
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6808
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6809
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6810
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6811
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6812
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6813
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6814
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6345
6815
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6346
6816
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6347
6817
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6348
|
-
#
|
6818
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6349
6819
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6350
|
-
# ', alphaFrac, ')'].join(''); `; var
|
6351
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
6352
|
-
#
|
6353
|
-
#
|
6354
|
-
#
|
6355
|
-
#
|
6820
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6821
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6822
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6823
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6824
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6825
|
+
# / ...
|
6356
6826
|
class GoogleTypeColor
|
6357
6827
|
include Google::Apis::Core::Hashable
|
6358
6828
|
|
6359
6829
|
# The fraction of this color that should be applied to the pixel. That is, the
|
6360
|
-
# final pixel color is defined by the equation: pixel color = alpha * (this
|
6361
|
-
# color) + (1.0 - alpha) * (background color) This means that a value of 1.0
|
6830
|
+
# final pixel color is defined by the equation: `pixel color = alpha * (this
|
6831
|
+
# color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
|
6362
6832
|
# corresponds to a solid color, whereas a value of 0.0 corresponds to a
|
6363
6833
|
# completely transparent color. This uses a wrapper message rather than a simple
|
6364
6834
|
# float scalar so that it is possible to distinguish between a default value and
|
6365
|
-
# the value being unset. If omitted, this color object is
|
6366
|
-
#
|
6367
|
-
# 0).
|
6835
|
+
# the value being unset. If omitted, this color object is rendered as a solid
|
6836
|
+
# color (as if the alpha value had been explicitly given a value of 1.0).
|
6368
6837
|
# Corresponds to the JSON property `alpha`
|
6369
6838
|
# @return [Float]
|
6370
6839
|
attr_accessor :alpha
|