google-apis-documentai_v1beta2 0.5.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a2a7e9f260f096833e144600c748223cb7a743f6282a507dc89758cbe13f0c7
|
4
|
+
data.tar.gz: 4aedcd9e2b44feb0662da3eb535642d26a49b5fb83f51f05827722132e908da7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3aeb50382c9934b11f2527ba7ef98704faf8746021c1882c477d8be140414560819d332dc5237a4294af9c985736bdfa471011e89b34dbf7c91421a32cb6bbd
|
7
|
+
data.tar.gz: e9dbb269dec85b3e0f7174b2f9341f616aa74e2661a353f2678fc5c4360da94aa69e6431041ef488e17a7b455ccbedbf36e5898bb6ae0dee8398b886cbae200c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Release history for google-apis-documentai_v1beta2
|
2
2
|
|
3
|
+
### v0.10.0 (2021-05-19)
|
4
|
+
|
5
|
+
* Unspecified changes
|
6
|
+
|
7
|
+
### v0.9.0 (2021-05-12)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20210507
|
10
|
+
|
11
|
+
### v0.8.0 (2021-03-31)
|
12
|
+
|
13
|
+
* Regenerated from discovery document revision 20210329
|
14
|
+
|
15
|
+
### v0.7.0 (2021-03-24)
|
16
|
+
|
17
|
+
* Regenerated from discovery document revision 20210320
|
18
|
+
|
19
|
+
### v0.6.0 (2021-03-09)
|
20
|
+
|
21
|
+
* Regenerated from discovery document revision 20210308
|
22
|
+
* Regenerated using generator version 0.2.0
|
23
|
+
|
3
24
|
### v0.5.0 (2021-03-04)
|
4
25
|
|
5
26
|
* Regenerated from discovery document revision 20210226
|
@@ -31,7 +31,7 @@ module Google
|
|
31
31
|
# This is NOT the gem version.
|
32
32
|
VERSION = 'V1beta2'
|
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
|
@@ -341,12 +341,22 @@ module Google
|
|
341
341
|
class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation
|
342
342
|
include Google::Apis::Core::Hashable
|
343
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
|
+
|
344
349
|
# Error information for the dataset as a whole. A maximum of 10 dataset errors
|
345
350
|
# will be returned. A single dataset error is terminal for training.
|
346
351
|
# Corresponds to the JSON property `datasetErrors`
|
347
352
|
# @return [Array<Google::Apis::DocumentaiV1beta2::GoogleRpcStatus>]
|
348
353
|
attr_accessor :dataset_errors
|
349
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
|
+
|
350
360
|
# Error information pertaining to specific documents. A maximum of 10 document
|
351
361
|
# errors will be returned. Any document with errors will not be used throughout
|
352
362
|
# training.
|
@@ -360,7 +370,9 @@ module Google
|
|
360
370
|
|
361
371
|
# Update properties of this object
|
362
372
|
def update!(**args)
|
373
|
+
@dataset_error_count = args[:dataset_error_count] if args.key?(:dataset_error_count)
|
363
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)
|
364
376
|
@document_errors = args[:document_errors] if args.key?(:document_errors)
|
365
377
|
end
|
366
378
|
end
|
@@ -719,9 +731,9 @@ module Google
|
|
719
731
|
class GoogleCloudDocumentaiV1beta1Document
|
720
732
|
include Google::Apis::Core::Hashable
|
721
733
|
|
722
|
-
# Inline document content, represented as a stream of bytes. Note: As
|
723
|
-
# bytes` fields, protobuffers use a pure binary representation,
|
724
|
-
# representations use base64.
|
734
|
+
# Optional. Inline document content, represented as a stream of bytes. Note: As
|
735
|
+
# with all `bytes` fields, protobuffers use a pure binary representation,
|
736
|
+
# whereas JSON representations use base64.
|
725
737
|
# Corresponds to the JSON property `content`
|
726
738
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
727
739
|
# @return [String]
|
@@ -771,7 +783,7 @@ module Google
|
|
771
783
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentShardInfo]
|
772
784
|
attr_accessor :shard_info
|
773
785
|
|
774
|
-
# UTF-8 encoded text in reading order from the document.
|
786
|
+
# Optional. UTF-8 encoded text in reading order from the document.
|
775
787
|
# Corresponds to the JSON property `text`
|
776
788
|
# @return [String]
|
777
789
|
attr_accessor :text
|
@@ -788,16 +800,10 @@ module Google
|
|
788
800
|
# @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyle>]
|
789
801
|
attr_accessor :text_styles
|
790
802
|
|
791
|
-
#
|
792
|
-
#
|
793
|
-
#
|
794
|
-
#
|
795
|
-
attr_accessor :translations
|
796
|
-
|
797
|
-
# Currently supports Google Cloud Storage URI of the form `gs://bucket_name/
|
798
|
-
# object_name`. Object versioning is not supported. See [Google Cloud Storage
|
799
|
-
# Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
800
|
-
# info.
|
803
|
+
# Optional. Currently supports Google Cloud Storage URI of the form `gs://
|
804
|
+
# bucket_name/object_name`. Object versioning is not supported. See [Google
|
805
|
+
# Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-
|
806
|
+
# uris) for more info.
|
801
807
|
# Corresponds to the JSON property `uri`
|
802
808
|
# @return [String]
|
803
809
|
attr_accessor :uri
|
@@ -819,7 +825,6 @@ module Google
|
|
819
825
|
@text = args[:text] if args.key?(:text)
|
820
826
|
@text_changes = args[:text_changes] if args.key?(:text_changes)
|
821
827
|
@text_styles = args[:text_styles] if args.key?(:text_styles)
|
822
|
-
@translations = args[:translations] if args.key?(:translations)
|
823
828
|
@uri = args[:uri] if args.key?(:uri)
|
824
829
|
end
|
825
830
|
end
|
@@ -840,12 +845,12 @@ module Google
|
|
840
845
|
# @return [String]
|
841
846
|
attr_accessor :id
|
842
847
|
|
843
|
-
# Deprecated. Use `id` field instead.
|
848
|
+
# Optional. Deprecated. Use `id` field instead.
|
844
849
|
# Corresponds to the JSON property `mentionId`
|
845
850
|
# @return [String]
|
846
851
|
attr_accessor :mention_id
|
847
852
|
|
848
|
-
# Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
853
|
+
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
849
854
|
# Corresponds to the JSON property `mentionText`
|
850
855
|
# @return [String]
|
851
856
|
attr_accessor :mention_text
|
@@ -1153,6 +1158,11 @@ module Google
|
|
1153
1158
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1BoundingPoly]
|
1154
1159
|
attr_accessor :bounding_poly
|
1155
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
|
+
|
1156
1166
|
# Optional. Deprecated. Use PageRef.bounding_poly instead.
|
1157
1167
|
# Corresponds to the JSON property `layoutId`
|
1158
1168
|
# @return [String]
|
@@ -1176,6 +1186,7 @@ module Google
|
|
1176
1186
|
# Update properties of this object
|
1177
1187
|
def update!(**args)
|
1178
1188
|
@bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
|
1189
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1179
1190
|
@layout_id = args[:layout_id] if args.key?(:layout_id)
|
1180
1191
|
@layout_type = args[:layout_type] if args.key?(:layout_type)
|
1181
1192
|
@page = args[:page] if args.key?(:page)
|
@@ -1730,6 +1741,12 @@ module Google
|
|
1730
1741
|
# @return [Fixnum]
|
1731
1742
|
attr_accessor :id
|
1732
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
|
+
|
1733
1750
|
# The index of the [Document.revisions] identifying the parent revision.
|
1734
1751
|
# Corresponds to the JSON property `revision`
|
1735
1752
|
# @return [Fixnum]
|
@@ -1742,6 +1759,7 @@ module Google
|
|
1742
1759
|
# Update properties of this object
|
1743
1760
|
def update!(**args)
|
1744
1761
|
@id = args[:id] if args.key?(:id)
|
1762
|
+
@index = args[:index] if args.key?(:index)
|
1745
1763
|
@revision = args[:revision] if args.key?(:revision)
|
1746
1764
|
end
|
1747
1765
|
end
|
@@ -1864,98 +1882,98 @@ module Google
|
|
1864
1882
|
|
1865
1883
|
# Represents a color in the RGBA color space. This representation is designed
|
1866
1884
|
# for simplicity of conversion to/from color representations in various
|
1867
|
-
# languages over compactness
|
1868
|
-
# be trivially provided to the constructor of
|
1869
|
-
# 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`
|
1870
1888
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1871
|
-
# CSS
|
1889
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1872
1890
|
# information about the absolute color space that should be used to interpret
|
1873
1891
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1874
|
-
# applications
|
1875
|
-
#
|
1876
|
-
#
|
1877
|
-
#
|
1878
|
-
#
|
1879
|
-
# protocolor.
|
1880
|
-
#
|
1881
|
-
#
|
1882
|
-
# float
|
1883
|
-
# float
|
1884
|
-
#
|
1885
|
-
#
|
1886
|
-
#
|
1887
|
-
#
|
1888
|
-
#
|
1889
|
-
#
|
1890
|
-
#
|
1891
|
-
#
|
1892
|
-
#
|
1893
|
-
#
|
1894
|
-
#
|
1895
|
-
#
|
1896
|
-
#
|
1897
|
-
#
|
1898
|
-
#
|
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;
|
1899
1917
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1900
1918
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1901
1919
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1902
|
-
#
|
1920
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1903
1921
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1904
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1905
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1906
|
-
#
|
1907
|
-
#
|
1908
|
-
#
|
1909
|
-
#
|
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
|
+
# / ...
|
1910
1928
|
# Corresponds to the JSON property `backgroundColor`
|
1911
1929
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor]
|
1912
1930
|
attr_accessor :background_color
|
1913
1931
|
|
1914
1932
|
# Represents a color in the RGBA color space. This representation is designed
|
1915
1933
|
# for simplicity of conversion to/from color representations in various
|
1916
|
-
# languages over compactness
|
1917
|
-
# be trivially provided to the constructor of
|
1918
|
-
# 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`
|
1919
1937
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1920
|
-
# CSS
|
1938
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1921
1939
|
# information about the absolute color space that should be used to interpret
|
1922
1940
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1923
|
-
# applications
|
1924
|
-
#
|
1925
|
-
#
|
1926
|
-
#
|
1927
|
-
#
|
1928
|
-
# protocolor.
|
1929
|
-
#
|
1930
|
-
#
|
1931
|
-
# float
|
1932
|
-
# float
|
1933
|
-
#
|
1934
|
-
#
|
1935
|
-
#
|
1936
|
-
#
|
1937
|
-
#
|
1938
|
-
#
|
1939
|
-
#
|
1940
|
-
#
|
1941
|
-
#
|
1942
|
-
#
|
1943
|
-
#
|
1944
|
-
#
|
1945
|
-
#
|
1946
|
-
#
|
1947
|
-
#
|
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;
|
1948
1966
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1949
1967
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1950
1968
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1951
|
-
#
|
1969
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1952
1970
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1953
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1954
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1955
|
-
#
|
1956
|
-
#
|
1957
|
-
#
|
1958
|
-
#
|
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
|
+
# / ...
|
1959
1977
|
# Corresponds to the JSON property `color`
|
1960
1978
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor]
|
1961
1979
|
attr_accessor :color
|
@@ -2113,44 +2131,6 @@ module Google
|
|
2113
2131
|
end
|
2114
2132
|
end
|
2115
2133
|
|
2116
|
-
# A translation of the text segment.
|
2117
|
-
class GoogleCloudDocumentaiV1beta1DocumentTranslation
|
2118
|
-
include Google::Apis::Core::Hashable
|
2119
|
-
|
2120
|
-
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
|
2121
|
-
# see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
2122
|
-
# Corresponds to the JSON property `languageCode`
|
2123
|
-
# @return [String]
|
2124
|
-
attr_accessor :language_code
|
2125
|
-
|
2126
|
-
# The history of this annotation.
|
2127
|
-
# Corresponds to the JSON property `provenance`
|
2128
|
-
# @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance>]
|
2129
|
-
attr_accessor :provenance
|
2130
|
-
|
2131
|
-
# Text reference indexing into the Document.text.
|
2132
|
-
# Corresponds to the JSON property `textAnchor`
|
2133
|
-
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
|
2134
|
-
attr_accessor :text_anchor
|
2135
|
-
|
2136
|
-
# Text translated into the target language.
|
2137
|
-
# Corresponds to the JSON property `translatedText`
|
2138
|
-
# @return [String]
|
2139
|
-
attr_accessor :translated_text
|
2140
|
-
|
2141
|
-
def initialize(**args)
|
2142
|
-
update!(**args)
|
2143
|
-
end
|
2144
|
-
|
2145
|
-
# Update properties of this object
|
2146
|
-
def update!(**args)
|
2147
|
-
@language_code = args[:language_code] if args.key?(:language_code)
|
2148
|
-
@provenance = args[:provenance] if args.key?(:provenance)
|
2149
|
-
@text_anchor = args[:text_anchor] if args.key?(:text_anchor)
|
2150
|
-
@translated_text = args[:translated_text] if args.key?(:translated_text)
|
2151
|
-
end
|
2152
|
-
end
|
2153
|
-
|
2154
2134
|
# The Google Cloud Storage location where the output file will be written to.
|
2155
2135
|
class GoogleCloudDocumentaiV1beta1GcsDestination
|
2156
2136
|
include Google::Apis::Core::Hashable
|
@@ -2227,7 +2207,7 @@ module Google
|
|
2227
2207
|
# @return [Float]
|
2228
2208
|
attr_accessor :x
|
2229
2209
|
|
2230
|
-
# Y coordinate.
|
2210
|
+
# Y coordinate (starts from the top of the image).
|
2231
2211
|
# Corresponds to the JSON property `y`
|
2232
2212
|
# @return [Float]
|
2233
2213
|
attr_accessor :y
|
@@ -2348,7 +2328,7 @@ module Google
|
|
2348
2328
|
# @return [Fixnum]
|
2349
2329
|
attr_accessor :x
|
2350
2330
|
|
2351
|
-
# Y coordinate.
|
2331
|
+
# Y coordinate (starts from the top of the image).
|
2352
2332
|
# Corresponds to the JSON property `y`
|
2353
2333
|
# @return [Fixnum]
|
2354
2334
|
attr_accessor :y
|
@@ -2456,9 +2436,9 @@ module Google
|
|
2456
2436
|
class GoogleCloudDocumentaiV1beta2Document
|
2457
2437
|
include Google::Apis::Core::Hashable
|
2458
2438
|
|
2459
|
-
# Inline document content, represented as a stream of bytes. Note: As
|
2460
|
-
# bytes` fields, protobuffers use a pure binary representation,
|
2461
|
-
# representations use base64.
|
2439
|
+
# Optional. Inline document content, represented as a stream of bytes. Note: As
|
2440
|
+
# with all `bytes` fields, protobuffers use a pure binary representation,
|
2441
|
+
# whereas JSON representations use base64.
|
2462
2442
|
# Corresponds to the JSON property `content`
|
2463
2443
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2464
2444
|
# @return [String]
|
@@ -2513,7 +2493,7 @@ module Google
|
|
2513
2493
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentShardInfo]
|
2514
2494
|
attr_accessor :shard_info
|
2515
2495
|
|
2516
|
-
# UTF-8 encoded text in reading order from the document.
|
2496
|
+
# Optional. UTF-8 encoded text in reading order from the document.
|
2517
2497
|
# Corresponds to the JSON property `text`
|
2518
2498
|
# @return [String]
|
2519
2499
|
attr_accessor :text
|
@@ -2530,16 +2510,10 @@ module Google
|
|
2530
2510
|
# @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyle>]
|
2531
2511
|
attr_accessor :text_styles
|
2532
2512
|
|
2533
|
-
#
|
2534
|
-
#
|
2535
|
-
#
|
2536
|
-
#
|
2537
|
-
attr_accessor :translations
|
2538
|
-
|
2539
|
-
# Currently supports Google Cloud Storage URI of the form `gs://bucket_name/
|
2540
|
-
# object_name`. Object versioning is not supported. See [Google Cloud Storage
|
2541
|
-
# Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
2542
|
-
# info.
|
2513
|
+
# Optional. Currently supports Google Cloud Storage URI of the form `gs://
|
2514
|
+
# bucket_name/object_name`. Object versioning is not supported. See [Google
|
2515
|
+
# Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-
|
2516
|
+
# uris) for more info.
|
2543
2517
|
# Corresponds to the JSON property `uri`
|
2544
2518
|
# @return [String]
|
2545
2519
|
attr_accessor :uri
|
@@ -2562,7 +2536,6 @@ module Google
|
|
2562
2536
|
@text = args[:text] if args.key?(:text)
|
2563
2537
|
@text_changes = args[:text_changes] if args.key?(:text_changes)
|
2564
2538
|
@text_styles = args[:text_styles] if args.key?(:text_styles)
|
2565
|
-
@translations = args[:translations] if args.key?(:translations)
|
2566
2539
|
@uri = args[:uri] if args.key?(:uri)
|
2567
2540
|
end
|
2568
2541
|
end
|
@@ -2583,12 +2556,12 @@ module Google
|
|
2583
2556
|
# @return [String]
|
2584
2557
|
attr_accessor :id
|
2585
2558
|
|
2586
|
-
# Deprecated. Use `id` field instead.
|
2559
|
+
# Optional. Deprecated. Use `id` field instead.
|
2587
2560
|
# Corresponds to the JSON property `mentionId`
|
2588
2561
|
# @return [String]
|
2589
2562
|
attr_accessor :mention_id
|
2590
2563
|
|
2591
|
-
# Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
2564
|
+
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
2592
2565
|
# Corresponds to the JSON property `mentionText`
|
2593
2566
|
# @return [String]
|
2594
2567
|
attr_accessor :mention_text
|
@@ -2933,6 +2906,11 @@ module Google
|
|
2933
2906
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BoundingPoly]
|
2934
2907
|
attr_accessor :bounding_poly
|
2935
2908
|
|
2909
|
+
# Optional. Confidence of detected page element, if applicable. Range [0, 1].
|
2910
|
+
# Corresponds to the JSON property `confidence`
|
2911
|
+
# @return [Float]
|
2912
|
+
attr_accessor :confidence
|
2913
|
+
|
2936
2914
|
# Optional. Deprecated. Use PageRef.bounding_poly instead.
|
2937
2915
|
# Corresponds to the JSON property `layoutId`
|
2938
2916
|
# @return [String]
|
@@ -2956,6 +2934,7 @@ module Google
|
|
2956
2934
|
# Update properties of this object
|
2957
2935
|
def update!(**args)
|
2958
2936
|
@bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
|
2937
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2959
2938
|
@layout_id = args[:layout_id] if args.key?(:layout_id)
|
2960
2939
|
@layout_type = args[:layout_type] if args.key?(:layout_type)
|
2961
2940
|
@page = args[:page] if args.key?(:page)
|
@@ -3510,6 +3489,12 @@ module Google
|
|
3510
3489
|
# @return [Fixnum]
|
3511
3490
|
attr_accessor :id
|
3512
3491
|
|
3492
|
+
# The index of the parent revisions corresponding collection of items (eg. list
|
3493
|
+
# of entities, properties within entities, etc.)
|
3494
|
+
# Corresponds to the JSON property `index`
|
3495
|
+
# @return [Fixnum]
|
3496
|
+
attr_accessor :index
|
3497
|
+
|
3513
3498
|
# The index of the [Document.revisions] identifying the parent revision.
|
3514
3499
|
# Corresponds to the JSON property `revision`
|
3515
3500
|
# @return [Fixnum]
|
@@ -3522,6 +3507,7 @@ module Google
|
|
3522
3507
|
# Update properties of this object
|
3523
3508
|
def update!(**args)
|
3524
3509
|
@id = args[:id] if args.key?(:id)
|
3510
|
+
@index = args[:index] if args.key?(:index)
|
3525
3511
|
@revision = args[:revision] if args.key?(:revision)
|
3526
3512
|
end
|
3527
3513
|
end
|
@@ -3644,98 +3630,98 @@ module Google
|
|
3644
3630
|
|
3645
3631
|
# Represents a color in the RGBA color space. This representation is designed
|
3646
3632
|
# for simplicity of conversion to/from color representations in various
|
3647
|
-
# languages over compactness
|
3648
|
-
# be trivially provided to the constructor of
|
3649
|
-
# also be trivially provided to UIColor's
|
3633
|
+
# languages over compactness. For example, the fields of this representation can
|
3634
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3635
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3650
3636
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3651
|
-
# CSS
|
3637
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3652
3638
|
# information about the absolute color space that should be used to interpret
|
3653
3639
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3654
|
-
# applications
|
3655
|
-
#
|
3656
|
-
#
|
3657
|
-
#
|
3658
|
-
#
|
3659
|
-
# protocolor.
|
3660
|
-
#
|
3661
|
-
#
|
3662
|
-
# float
|
3663
|
-
# float
|
3664
|
-
#
|
3665
|
-
#
|
3666
|
-
#
|
3667
|
-
#
|
3668
|
-
#
|
3669
|
-
#
|
3670
|
-
#
|
3671
|
-
#
|
3672
|
-
#
|
3673
|
-
#
|
3674
|
-
#
|
3675
|
-
#
|
3676
|
-
#
|
3677
|
-
#
|
3678
|
-
#
|
3640
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3641
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3642
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3643
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3644
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3645
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3646
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3647
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3648
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3649
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3650
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3651
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3652
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3653
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3654
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3655
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3656
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3657
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3658
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3659
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3660
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3661
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3662
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3663
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3664
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3679
3665
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3680
3666
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3681
3667
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3682
|
-
#
|
3668
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3683
3669
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3684
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3685
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3686
|
-
#
|
3687
|
-
#
|
3688
|
-
#
|
3689
|
-
#
|
3670
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3671
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3672
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3673
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3674
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3675
|
+
# / ...
|
3690
3676
|
# Corresponds to the JSON property `backgroundColor`
|
3691
3677
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor]
|
3692
3678
|
attr_accessor :background_color
|
3693
3679
|
|
3694
3680
|
# Represents a color in the RGBA color space. This representation is designed
|
3695
3681
|
# for simplicity of conversion to/from color representations in various
|
3696
|
-
# languages over compactness
|
3697
|
-
# be trivially provided to the constructor of
|
3698
|
-
# also be trivially provided to UIColor's
|
3682
|
+
# languages over compactness. For example, the fields of this representation can
|
3683
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3684
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3699
3685
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3700
|
-
# CSS
|
3686
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3701
3687
|
# information about the absolute color space that should be used to interpret
|
3702
3688
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3703
|
-
# applications
|
3704
|
-
#
|
3705
|
-
#
|
3706
|
-
#
|
3707
|
-
#
|
3708
|
-
# protocolor.
|
3709
|
-
#
|
3710
|
-
#
|
3711
|
-
# float
|
3712
|
-
# float
|
3713
|
-
#
|
3714
|
-
#
|
3715
|
-
#
|
3716
|
-
#
|
3717
|
-
#
|
3718
|
-
#
|
3719
|
-
#
|
3720
|
-
#
|
3721
|
-
#
|
3722
|
-
#
|
3723
|
-
#
|
3724
|
-
#
|
3725
|
-
#
|
3726
|
-
#
|
3727
|
-
#
|
3689
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3690
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3691
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3692
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3693
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3694
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3695
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3696
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3697
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3698
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3699
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3700
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3701
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3702
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3703
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3704
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3705
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3706
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3707
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3708
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3709
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3710
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3711
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3712
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3713
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3728
3714
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3729
3715
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3730
3716
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3731
|
-
#
|
3717
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3732
3718
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3733
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3734
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3735
|
-
#
|
3736
|
-
#
|
3737
|
-
#
|
3738
|
-
#
|
3719
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3720
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3721
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3722
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3723
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3724
|
+
# / ...
|
3739
3725
|
# Corresponds to the JSON property `color`
|
3740
3726
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor]
|
3741
3727
|
attr_accessor :color
|
@@ -3893,44 +3879,6 @@ module Google
|
|
3893
3879
|
end
|
3894
3880
|
end
|
3895
3881
|
|
3896
|
-
# A translation of the text segment.
|
3897
|
-
class GoogleCloudDocumentaiV1beta2DocumentTranslation
|
3898
|
-
include Google::Apis::Core::Hashable
|
3899
|
-
|
3900
|
-
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
|
3901
|
-
# see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
3902
|
-
# Corresponds to the JSON property `languageCode`
|
3903
|
-
# @return [String]
|
3904
|
-
attr_accessor :language_code
|
3905
|
-
|
3906
|
-
# The history of this annotation.
|
3907
|
-
# Corresponds to the JSON property `provenance`
|
3908
|
-
# @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentProvenance>]
|
3909
|
-
attr_accessor :provenance
|
3910
|
-
|
3911
|
-
# Text reference indexing into the Document.text.
|
3912
|
-
# Corresponds to the JSON property `textAnchor`
|
3913
|
-
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor]
|
3914
|
-
attr_accessor :text_anchor
|
3915
|
-
|
3916
|
-
# Text translated into the target language.
|
3917
|
-
# Corresponds to the JSON property `translatedText`
|
3918
|
-
# @return [String]
|
3919
|
-
attr_accessor :translated_text
|
3920
|
-
|
3921
|
-
def initialize(**args)
|
3922
|
-
update!(**args)
|
3923
|
-
end
|
3924
|
-
|
3925
|
-
# Update properties of this object
|
3926
|
-
def update!(**args)
|
3927
|
-
@language_code = args[:language_code] if args.key?(:language_code)
|
3928
|
-
@provenance = args[:provenance] if args.key?(:provenance)
|
3929
|
-
@text_anchor = args[:text_anchor] if args.key?(:text_anchor)
|
3930
|
-
@translated_text = args[:translated_text] if args.key?(:translated_text)
|
3931
|
-
end
|
3932
|
-
end
|
3933
|
-
|
3934
3882
|
# Parameters to control entity extraction behavior.
|
3935
3883
|
class GoogleCloudDocumentaiV1beta2EntityExtractionParams
|
3936
3884
|
include Google::Apis::Core::Hashable
|
@@ -4107,7 +4055,7 @@ module Google
|
|
4107
4055
|
# @return [Float]
|
4108
4056
|
attr_accessor :x
|
4109
4057
|
|
4110
|
-
# Y coordinate.
|
4058
|
+
# Y coordinate (starts from the top of the image).
|
4111
4059
|
# Corresponds to the JSON property `y`
|
4112
4060
|
# @return [Float]
|
4113
4061
|
attr_accessor :y
|
@@ -4391,7 +4339,7 @@ module Google
|
|
4391
4339
|
# @return [Fixnum]
|
4392
4340
|
attr_accessor :x
|
4393
4341
|
|
4394
|
-
# Y coordinate.
|
4342
|
+
# Y coordinate (starts from the top of the image).
|
4395
4343
|
# Corresponds to the JSON property `y`
|
4396
4344
|
# @return [Fixnum]
|
4397
4345
|
attr_accessor :y
|
@@ -4773,61 +4721,60 @@ module Google
|
|
4773
4721
|
|
4774
4722
|
# Represents a color in the RGBA color space. This representation is designed
|
4775
4723
|
# for simplicity of conversion to/from color representations in various
|
4776
|
-
# languages over compactness
|
4777
|
-
# be trivially provided to the constructor of
|
4778
|
-
# also be trivially provided to UIColor's
|
4724
|
+
# languages over compactness. For example, the fields of this representation can
|
4725
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
4726
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
4779
4727
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
4780
|
-
# CSS
|
4728
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
4781
4729
|
# information about the absolute color space that should be used to interpret
|
4782
4730
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
4783
|
-
# applications
|
4784
|
-
#
|
4785
|
-
#
|
4786
|
-
#
|
4787
|
-
#
|
4788
|
-
# protocolor.
|
4789
|
-
#
|
4790
|
-
#
|
4791
|
-
# float
|
4792
|
-
# float
|
4793
|
-
#
|
4794
|
-
#
|
4795
|
-
#
|
4796
|
-
#
|
4797
|
-
#
|
4798
|
-
#
|
4799
|
-
#
|
4800
|
-
#
|
4801
|
-
#
|
4802
|
-
#
|
4803
|
-
#
|
4804
|
-
#
|
4805
|
-
#
|
4806
|
-
#
|
4807
|
-
#
|
4731
|
+
# applications should assume the sRGB color space. When color equality needs to
|
4732
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
4733
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
4734
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
4735
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
4736
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
4737
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
4738
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
4739
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
4740
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
4741
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
4742
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
4743
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
4744
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
4745
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
4746
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
4747
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
4748
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
4749
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
4750
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
4751
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
4752
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
4753
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
4754
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
4755
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
4808
4756
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
4809
4757
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
4810
4758
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
4811
|
-
#
|
4759
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
4812
4760
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
4813
|
-
# ', alphaFrac, ')'].join(''); `; var
|
4814
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
4815
|
-
#
|
4816
|
-
#
|
4817
|
-
#
|
4818
|
-
#
|
4761
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
4762
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
4763
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
4764
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
4765
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
4766
|
+
# / ...
|
4819
4767
|
class GoogleTypeColor
|
4820
4768
|
include Google::Apis::Core::Hashable
|
4821
4769
|
|
4822
4770
|
# The fraction of this color that should be applied to the pixel. That is, the
|
4823
|
-
# final pixel color is defined by the equation: pixel color = alpha * (this
|
4824
|
-
# color) + (1.0 - alpha) * (background color) This means that a value of 1.0
|
4771
|
+
# final pixel color is defined by the equation: `pixel color = alpha * (this
|
4772
|
+
# color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
|
4825
4773
|
# corresponds to a solid color, whereas a value of 0.0 corresponds to a
|
4826
4774
|
# completely transparent color. This uses a wrapper message rather than a simple
|
4827
4775
|
# float scalar so that it is possible to distinguish between a default value and
|
4828
|
-
# the value being unset. If omitted, this color object is
|
4829
|
-
#
|
4830
|
-
# 0).
|
4776
|
+
# the value being unset. If omitted, this color object is rendered as a solid
|
4777
|
+
# color (as if the alpha value had been explicitly given a value of 1.0).
|
4831
4778
|
# Corresponds to the JSON property `alpha`
|
4832
4779
|
# @return [Float]
|
4833
4780
|
attr_accessor :alpha
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module DocumentaiV1beta2
|
18
18
|
# Version of the google-apis-documentai_v1beta2 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.10.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.2.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210507"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -400,12 +400,6 @@ module Google
|
|
400
400
|
include Google::Apis::Core::JsonObjectSupport
|
401
401
|
end
|
402
402
|
|
403
|
-
class GoogleCloudDocumentaiV1beta1DocumentTranslation
|
404
|
-
class Representation < Google::Apis::Core::JsonRepresentation; end
|
405
|
-
|
406
|
-
include Google::Apis::Core::JsonObjectSupport
|
407
|
-
end
|
408
|
-
|
409
403
|
class GoogleCloudDocumentaiV1beta1GcsDestination
|
410
404
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
411
405
|
|
@@ -676,12 +670,6 @@ module Google
|
|
676
670
|
include Google::Apis::Core::JsonObjectSupport
|
677
671
|
end
|
678
672
|
|
679
|
-
class GoogleCloudDocumentaiV1beta2DocumentTranslation
|
680
|
-
class Representation < Google::Apis::Core::JsonRepresentation; end
|
681
|
-
|
682
|
-
include Google::Apis::Core::JsonObjectSupport
|
683
|
-
end
|
684
|
-
|
685
673
|
class GoogleCloudDocumentaiV1beta2EntityExtractionParams
|
686
674
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
687
675
|
|
@@ -996,8 +984,10 @@ module Google
|
|
996
984
|
class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation
|
997
985
|
# @private
|
998
986
|
class Representation < Google::Apis::Core::JsonRepresentation
|
987
|
+
property :dataset_error_count, as: 'datasetErrorCount'
|
999
988
|
collection :dataset_errors, as: 'datasetErrors', class: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus, decorator: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus::Representation
|
1000
989
|
|
990
|
+
property :document_error_count, as: 'documentErrorCount'
|
1001
991
|
collection :document_errors, as: 'documentErrors', class: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus, decorator: Google::Apis::DocumentaiV1beta2::GoogleRpcStatus::Representation
|
1002
992
|
|
1003
993
|
end
|
@@ -1144,8 +1134,6 @@ module Google
|
|
1144
1134
|
|
1145
1135
|
collection :text_styles, as: 'textStyles', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyle, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyle::Representation
|
1146
1136
|
|
1147
|
-
collection :translations, as: 'translations', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation::Representation
|
1148
|
-
|
1149
1137
|
property :uri, as: 'uri'
|
1150
1138
|
end
|
1151
1139
|
end
|
@@ -1241,6 +1229,7 @@ module Google
|
|
1241
1229
|
class Representation < Google::Apis::Core::JsonRepresentation
|
1242
1230
|
property :bounding_poly, as: 'boundingPoly', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1BoundingPoly, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1BoundingPoly::Representation
|
1243
1231
|
|
1232
|
+
property :confidence, as: 'confidence'
|
1244
1233
|
property :layout_id, as: 'layoutId'
|
1245
1234
|
property :layout_type, as: 'layoutType'
|
1246
1235
|
property :page, :numeric_string => true, as: 'page'
|
@@ -1428,6 +1417,7 @@ module Google
|
|
1428
1417
|
# @private
|
1429
1418
|
class Representation < Google::Apis::Core::JsonRepresentation
|
1430
1419
|
property :id, as: 'id'
|
1420
|
+
property :index, as: 'index'
|
1431
1421
|
property :revision, as: 'revision'
|
1432
1422
|
end
|
1433
1423
|
end
|
@@ -1515,18 +1505,6 @@ module Google
|
|
1515
1505
|
end
|
1516
1506
|
end
|
1517
1507
|
|
1518
|
-
class GoogleCloudDocumentaiV1beta1DocumentTranslation
|
1519
|
-
# @private
|
1520
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
1521
|
-
property :language_code, as: 'languageCode'
|
1522
|
-
collection :provenance, as: 'provenance', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance::Representation
|
1523
|
-
|
1524
|
-
property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor::Representation
|
1525
|
-
|
1526
|
-
property :translated_text, as: 'translatedText'
|
1527
|
-
end
|
1528
|
-
end
|
1529
|
-
|
1530
1508
|
class GoogleCloudDocumentaiV1beta1GcsDestination
|
1531
1509
|
# @private
|
1532
1510
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -1652,8 +1630,6 @@ module Google
|
|
1652
1630
|
|
1653
1631
|
collection :text_styles, as: 'textStyles', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyle, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyle::Representation
|
1654
1632
|
|
1655
|
-
collection :translations, as: 'translations', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTranslation, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTranslation::Representation
|
1656
|
-
|
1657
1633
|
property :uri, as: 'uri'
|
1658
1634
|
end
|
1659
1635
|
end
|
@@ -1758,6 +1734,7 @@ module Google
|
|
1758
1734
|
class Representation < Google::Apis::Core::JsonRepresentation
|
1759
1735
|
property :bounding_poly, as: 'boundingPoly', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BoundingPoly, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BoundingPoly::Representation
|
1760
1736
|
|
1737
|
+
property :confidence, as: 'confidence'
|
1761
1738
|
property :layout_id, as: 'layoutId'
|
1762
1739
|
property :layout_type, as: 'layoutType'
|
1763
1740
|
property :page, :numeric_string => true, as: 'page'
|
@@ -1945,6 +1922,7 @@ module Google
|
|
1945
1922
|
# @private
|
1946
1923
|
class Representation < Google::Apis::Core::JsonRepresentation
|
1947
1924
|
property :id, as: 'id'
|
1925
|
+
property :index, as: 'index'
|
1948
1926
|
property :revision, as: 'revision'
|
1949
1927
|
end
|
1950
1928
|
end
|
@@ -2032,18 +2010,6 @@ module Google
|
|
2032
2010
|
end
|
2033
2011
|
end
|
2034
2012
|
|
2035
|
-
class GoogleCloudDocumentaiV1beta2DocumentTranslation
|
2036
|
-
# @private
|
2037
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
2038
|
-
property :language_code, as: 'languageCode'
|
2039
|
-
collection :provenance, as: 'provenance', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentProvenance, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentProvenance::Representation
|
2040
|
-
|
2041
|
-
property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor::Representation
|
2042
|
-
|
2043
|
-
property :translated_text, as: 'translatedText'
|
2044
|
-
end
|
2045
|
-
end
|
2046
|
-
|
2047
2013
|
class GoogleCloudDocumentaiV1beta2EntityExtractionParams
|
2048
2014
|
# @private
|
2049
2015
|
class Representation < Google::Apis::Core::JsonRepresentation
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-documentai_v1beta2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
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-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -52,7 +52,7 @@ licenses:
|
|
52
52
|
metadata:
|
53
53
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
54
54
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-documentai_v1beta2/CHANGELOG.md
|
55
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-documentai_v1beta2/v0.
|
55
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-documentai_v1beta2/v0.10.0
|
56
56
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-documentai_v1beta2
|
57
57
|
post_install_message:
|
58
58
|
rdoc_options: []
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.2.
|
72
|
+
rubygems_version: 3.2.17
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Simple REST client for Cloud Document AI API V1beta2
|