google-apis-documentai_v1beta2 0.3.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 705924780649685c53473ec217eb0c74a1c82047c2832b253dc79eba77e2ad30
|
4
|
+
data.tar.gz: 66cd77361e2f8c3ce89bf3e352073542b069883b18c2e64ca8fd4b2536faa12d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9366f71f3600d5099d35be5cc03493e547fef99e1146bebd04421e3f7db18b1193b889c84cb4ad03d108169998b36e2ee276cb49d89f05acf23c39940d54f725
|
7
|
+
data.tar.gz: 691af8764b3848887e1a97041cba2d823b0ca9b5bfb4988f32fe2547204b82e4f5f3012e277129bac655cdc7b3a920feba08038f3585e678f2a4d7c7c7e747e3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Release history for google-apis-documentai_v1beta2
|
2
2
|
|
3
|
+
### v0.8.0 (2021-03-31)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210329
|
6
|
+
|
7
|
+
### v0.7.0 (2021-03-24)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20210320
|
10
|
+
|
11
|
+
### v0.6.0 (2021-03-09)
|
12
|
+
|
13
|
+
* Regenerated from discovery document revision 20210308
|
14
|
+
* Regenerated using generator version 0.2.0
|
15
|
+
|
16
|
+
### v0.5.0 (2021-03-04)
|
17
|
+
|
18
|
+
* Regenerated from discovery document revision 20210226
|
19
|
+
|
20
|
+
### v0.4.0 (2021-02-24)
|
21
|
+
|
22
|
+
* Regenerated from discovery document revision 20210222
|
23
|
+
|
3
24
|
### v0.3.0 (2021-02-12)
|
4
25
|
|
5
26
|
* Regenerated from discovery document revision 20210211
|
@@ -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
|
@@ -271,6 +271,38 @@ module Google
|
|
271
271
|
end
|
272
272
|
end
|
273
273
|
|
274
|
+
# The long running operation metadata for set default processor version method.
|
275
|
+
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata
|
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::DocumentaiV1beta2::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
|
+
# Response message for set default processor version method.
|
294
|
+
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionResponse
|
295
|
+
include Google::Apis::Core::Hashable
|
296
|
+
|
297
|
+
def initialize(**args)
|
298
|
+
update!(**args)
|
299
|
+
end
|
300
|
+
|
301
|
+
# Update properties of this object
|
302
|
+
def update!(**args)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
274
306
|
# The metadata that represents a processor version being created.
|
275
307
|
class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadata
|
276
308
|
include Google::Apis::Core::Hashable
|
@@ -687,9 +719,9 @@ module Google
|
|
687
719
|
class GoogleCloudDocumentaiV1beta1Document
|
688
720
|
include Google::Apis::Core::Hashable
|
689
721
|
|
690
|
-
# Inline document content, represented as a stream of bytes. Note: As
|
691
|
-
# bytes` fields, protobuffers use a pure binary representation,
|
692
|
-
# representations use base64.
|
722
|
+
# Optional. Inline document content, represented as a stream of bytes. Note: As
|
723
|
+
# with all `bytes` fields, protobuffers use a pure binary representation,
|
724
|
+
# whereas JSON representations use base64.
|
693
725
|
# Corresponds to the JSON property `content`
|
694
726
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
695
727
|
# @return [String]
|
@@ -739,7 +771,7 @@ module Google
|
|
739
771
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentShardInfo]
|
740
772
|
attr_accessor :shard_info
|
741
773
|
|
742
|
-
# UTF-8 encoded text in reading order from the document.
|
774
|
+
# Optional. UTF-8 encoded text in reading order from the document.
|
743
775
|
# Corresponds to the JSON property `text`
|
744
776
|
# @return [String]
|
745
777
|
attr_accessor :text
|
@@ -756,16 +788,10 @@ module Google
|
|
756
788
|
# @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyle>]
|
757
789
|
attr_accessor :text_styles
|
758
790
|
|
759
|
-
#
|
760
|
-
#
|
761
|
-
#
|
762
|
-
#
|
763
|
-
attr_accessor :translations
|
764
|
-
|
765
|
-
# Currently supports Google Cloud Storage URI of the form `gs://bucket_name/
|
766
|
-
# object_name`. Object versioning is not supported. See [Google Cloud Storage
|
767
|
-
# Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
768
|
-
# info.
|
791
|
+
# Optional. Currently supports Google Cloud Storage URI of the form `gs://
|
792
|
+
# bucket_name/object_name`. Object versioning is not supported. See [Google
|
793
|
+
# Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-
|
794
|
+
# uris) for more info.
|
769
795
|
# Corresponds to the JSON property `uri`
|
770
796
|
# @return [String]
|
771
797
|
attr_accessor :uri
|
@@ -787,7 +813,6 @@ module Google
|
|
787
813
|
@text = args[:text] if args.key?(:text)
|
788
814
|
@text_changes = args[:text_changes] if args.key?(:text_changes)
|
789
815
|
@text_styles = args[:text_styles] if args.key?(:text_styles)
|
790
|
-
@translations = args[:translations] if args.key?(:translations)
|
791
816
|
@uri = args[:uri] if args.key?(:uri)
|
792
817
|
end
|
793
818
|
end
|
@@ -808,12 +833,12 @@ module Google
|
|
808
833
|
# @return [String]
|
809
834
|
attr_accessor :id
|
810
835
|
|
811
|
-
# Deprecated. Use `id` field instead.
|
836
|
+
# Optional. Deprecated. Use `id` field instead.
|
812
837
|
# Corresponds to the JSON property `mentionId`
|
813
838
|
# @return [String]
|
814
839
|
attr_accessor :mention_id
|
815
840
|
|
816
|
-
# Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
841
|
+
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
817
842
|
# Corresponds to the JSON property `mentionText`
|
818
843
|
# @return [String]
|
819
844
|
attr_accessor :mention_text
|
@@ -896,6 +921,12 @@ module Google
|
|
896
921
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypePostalAddress]
|
897
922
|
attr_accessor :address_value
|
898
923
|
|
924
|
+
# Boolean value. Can be used for entities with binary values, or for checkboxes.
|
925
|
+
# Corresponds to the JSON property `booleanValue`
|
926
|
+
# @return [Boolean]
|
927
|
+
attr_accessor :boolean_value
|
928
|
+
alias_method :boolean_value?, :boolean_value
|
929
|
+
|
899
930
|
# Represents a whole or partial calendar date, such as a birthday. The time of
|
900
931
|
# day and time zone are either specified elsewhere or are insignificant. The
|
901
932
|
# date is relative to the Gregorian Calendar. This can represent one of the
|
@@ -948,6 +979,7 @@ module Google
|
|
948
979
|
# Update properties of this object
|
949
980
|
def update!(**args)
|
950
981
|
@address_value = args[:address_value] if args.key?(:address_value)
|
982
|
+
@boolean_value = args[:boolean_value] if args.key?(:boolean_value)
|
951
983
|
@date_value = args[:date_value] if args.key?(:date_value)
|
952
984
|
@datetime_value = args[:datetime_value] if args.key?(:datetime_value)
|
953
985
|
@money_value = args[:money_value] if args.key?(:money_value)
|
@@ -1825,98 +1857,98 @@ module Google
|
|
1825
1857
|
|
1826
1858
|
# Represents a color in the RGBA color space. This representation is designed
|
1827
1859
|
# for simplicity of conversion to/from color representations in various
|
1828
|
-
# languages over compactness
|
1829
|
-
# be trivially provided to the constructor of
|
1830
|
-
# also be trivially provided to UIColor's
|
1860
|
+
# languages over compactness. For example, the fields of this representation can
|
1861
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1862
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1831
1863
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1832
|
-
# CSS
|
1864
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1833
1865
|
# information about the absolute color space that should be used to interpret
|
1834
1866
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1835
|
-
# applications
|
1836
|
-
#
|
1837
|
-
#
|
1838
|
-
#
|
1839
|
-
#
|
1840
|
-
# protocolor.
|
1841
|
-
#
|
1842
|
-
#
|
1843
|
-
# float
|
1844
|
-
# float
|
1845
|
-
#
|
1846
|
-
#
|
1847
|
-
#
|
1848
|
-
#
|
1849
|
-
#
|
1850
|
-
#
|
1851
|
-
#
|
1852
|
-
#
|
1853
|
-
#
|
1854
|
-
#
|
1855
|
-
#
|
1856
|
-
#
|
1857
|
-
#
|
1858
|
-
#
|
1859
|
-
#
|
1867
|
+
# applications should assume the sRGB color space. When color equality needs to
|
1868
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
1869
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
1870
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
1871
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1872
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1873
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
1874
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
1875
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
1876
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
1877
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
1878
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
1879
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
1880
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
1881
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
1882
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
1883
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
1884
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
1885
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
1886
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
1887
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
1888
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
1889
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
1890
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
1891
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
1860
1892
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1861
1893
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1862
1894
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1863
|
-
#
|
1895
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1864
1896
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1865
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1866
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1867
|
-
#
|
1868
|
-
#
|
1869
|
-
#
|
1870
|
-
#
|
1897
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
1898
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
1899
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
1900
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
1901
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
1902
|
+
# / ...
|
1871
1903
|
# Corresponds to the JSON property `backgroundColor`
|
1872
1904
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor]
|
1873
1905
|
attr_accessor :background_color
|
1874
1906
|
|
1875
1907
|
# Represents a color in the RGBA color space. This representation is designed
|
1876
1908
|
# for simplicity of conversion to/from color representations in various
|
1877
|
-
# languages over compactness
|
1878
|
-
# be trivially provided to the constructor of
|
1879
|
-
# also be trivially provided to UIColor's
|
1909
|
+
# languages over compactness. For example, the fields of this representation can
|
1910
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1911
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1880
1912
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1881
|
-
# CSS
|
1913
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1882
1914
|
# information about the absolute color space that should be used to interpret
|
1883
1915
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1884
|
-
# applications
|
1885
|
-
#
|
1886
|
-
#
|
1887
|
-
#
|
1888
|
-
#
|
1889
|
-
# protocolor.
|
1890
|
-
#
|
1891
|
-
#
|
1892
|
-
# float
|
1893
|
-
# float
|
1894
|
-
#
|
1895
|
-
#
|
1896
|
-
#
|
1897
|
-
#
|
1898
|
-
#
|
1899
|
-
#
|
1900
|
-
#
|
1901
|
-
#
|
1902
|
-
#
|
1903
|
-
#
|
1904
|
-
#
|
1905
|
-
#
|
1906
|
-
#
|
1907
|
-
#
|
1908
|
-
#
|
1916
|
+
# applications should assume the sRGB color space. When color equality needs to
|
1917
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
1918
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
1919
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
1920
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1921
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1922
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
1923
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
1924
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
1925
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
1926
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
1927
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
1928
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
1929
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
1930
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
1931
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
1932
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
1933
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
1934
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
1935
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
1936
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
1937
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
1938
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
1939
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
1940
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
1909
1941
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1910
1942
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1911
1943
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1912
|
-
#
|
1944
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1913
1945
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1914
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1915
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1916
|
-
#
|
1917
|
-
#
|
1918
|
-
#
|
1919
|
-
#
|
1946
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
1947
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
1948
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
1949
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
1950
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
1951
|
+
# / ...
|
1920
1952
|
# Corresponds to the JSON property `color`
|
1921
1953
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor]
|
1922
1954
|
attr_accessor :color
|
@@ -2074,44 +2106,6 @@ module Google
|
|
2074
2106
|
end
|
2075
2107
|
end
|
2076
2108
|
|
2077
|
-
# A translation of the text segment.
|
2078
|
-
class GoogleCloudDocumentaiV1beta1DocumentTranslation
|
2079
|
-
include Google::Apis::Core::Hashable
|
2080
|
-
|
2081
|
-
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
|
2082
|
-
# see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
2083
|
-
# Corresponds to the JSON property `languageCode`
|
2084
|
-
# @return [String]
|
2085
|
-
attr_accessor :language_code
|
2086
|
-
|
2087
|
-
# The history of this annotation.
|
2088
|
-
# Corresponds to the JSON property `provenance`
|
2089
|
-
# @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance>]
|
2090
|
-
attr_accessor :provenance
|
2091
|
-
|
2092
|
-
# Text reference indexing into the Document.text.
|
2093
|
-
# Corresponds to the JSON property `textAnchor`
|
2094
|
-
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
|
2095
|
-
attr_accessor :text_anchor
|
2096
|
-
|
2097
|
-
# Text translated into the target language.
|
2098
|
-
# Corresponds to the JSON property `translatedText`
|
2099
|
-
# @return [String]
|
2100
|
-
attr_accessor :translated_text
|
2101
|
-
|
2102
|
-
def initialize(**args)
|
2103
|
-
update!(**args)
|
2104
|
-
end
|
2105
|
-
|
2106
|
-
# Update properties of this object
|
2107
|
-
def update!(**args)
|
2108
|
-
@language_code = args[:language_code] if args.key?(:language_code)
|
2109
|
-
@provenance = args[:provenance] if args.key?(:provenance)
|
2110
|
-
@text_anchor = args[:text_anchor] if args.key?(:text_anchor)
|
2111
|
-
@translated_text = args[:translated_text] if args.key?(:translated_text)
|
2112
|
-
end
|
2113
|
-
end
|
2114
|
-
|
2115
2109
|
# The Google Cloud Storage location where the output file will be written to.
|
2116
2110
|
class GoogleCloudDocumentaiV1beta1GcsDestination
|
2117
2111
|
include Google::Apis::Core::Hashable
|
@@ -2188,7 +2182,7 @@ module Google
|
|
2188
2182
|
# @return [Float]
|
2189
2183
|
attr_accessor :x
|
2190
2184
|
|
2191
|
-
# Y coordinate.
|
2185
|
+
# Y coordinate (starts from the top of the image).
|
2192
2186
|
# Corresponds to the JSON property `y`
|
2193
2187
|
# @return [Float]
|
2194
2188
|
attr_accessor :y
|
@@ -2309,7 +2303,7 @@ module Google
|
|
2309
2303
|
# @return [Fixnum]
|
2310
2304
|
attr_accessor :x
|
2311
2305
|
|
2312
|
-
# Y coordinate.
|
2306
|
+
# Y coordinate (starts from the top of the image).
|
2313
2307
|
# Corresponds to the JSON property `y`
|
2314
2308
|
# @return [Fixnum]
|
2315
2309
|
attr_accessor :y
|
@@ -2417,9 +2411,9 @@ module Google
|
|
2417
2411
|
class GoogleCloudDocumentaiV1beta2Document
|
2418
2412
|
include Google::Apis::Core::Hashable
|
2419
2413
|
|
2420
|
-
# Inline document content, represented as a stream of bytes. Note: As
|
2421
|
-
# bytes` fields, protobuffers use a pure binary representation,
|
2422
|
-
# representations use base64.
|
2414
|
+
# Optional. Inline document content, represented as a stream of bytes. Note: As
|
2415
|
+
# with all `bytes` fields, protobuffers use a pure binary representation,
|
2416
|
+
# whereas JSON representations use base64.
|
2423
2417
|
# Corresponds to the JSON property `content`
|
2424
2418
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2425
2419
|
# @return [String]
|
@@ -2474,7 +2468,7 @@ module Google
|
|
2474
2468
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentShardInfo]
|
2475
2469
|
attr_accessor :shard_info
|
2476
2470
|
|
2477
|
-
# UTF-8 encoded text in reading order from the document.
|
2471
|
+
# Optional. UTF-8 encoded text in reading order from the document.
|
2478
2472
|
# Corresponds to the JSON property `text`
|
2479
2473
|
# @return [String]
|
2480
2474
|
attr_accessor :text
|
@@ -2491,16 +2485,10 @@ module Google
|
|
2491
2485
|
# @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyle>]
|
2492
2486
|
attr_accessor :text_styles
|
2493
2487
|
|
2494
|
-
#
|
2495
|
-
#
|
2496
|
-
#
|
2497
|
-
#
|
2498
|
-
attr_accessor :translations
|
2499
|
-
|
2500
|
-
# Currently supports Google Cloud Storage URI of the form `gs://bucket_name/
|
2501
|
-
# object_name`. Object versioning is not supported. See [Google Cloud Storage
|
2502
|
-
# Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
2503
|
-
# info.
|
2488
|
+
# Optional. Currently supports Google Cloud Storage URI of the form `gs://
|
2489
|
+
# bucket_name/object_name`. Object versioning is not supported. See [Google
|
2490
|
+
# Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-
|
2491
|
+
# uris) for more info.
|
2504
2492
|
# Corresponds to the JSON property `uri`
|
2505
2493
|
# @return [String]
|
2506
2494
|
attr_accessor :uri
|
@@ -2523,7 +2511,6 @@ module Google
|
|
2523
2511
|
@text = args[:text] if args.key?(:text)
|
2524
2512
|
@text_changes = args[:text_changes] if args.key?(:text_changes)
|
2525
2513
|
@text_styles = args[:text_styles] if args.key?(:text_styles)
|
2526
|
-
@translations = args[:translations] if args.key?(:translations)
|
2527
2514
|
@uri = args[:uri] if args.key?(:uri)
|
2528
2515
|
end
|
2529
2516
|
end
|
@@ -2544,12 +2531,12 @@ module Google
|
|
2544
2531
|
# @return [String]
|
2545
2532
|
attr_accessor :id
|
2546
2533
|
|
2547
|
-
# Deprecated. Use `id` field instead.
|
2534
|
+
# Optional. Deprecated. Use `id` field instead.
|
2548
2535
|
# Corresponds to the JSON property `mentionId`
|
2549
2536
|
# @return [String]
|
2550
2537
|
attr_accessor :mention_id
|
2551
2538
|
|
2552
|
-
# Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
2539
|
+
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
2553
2540
|
# Corresponds to the JSON property `mentionText`
|
2554
2541
|
# @return [String]
|
2555
2542
|
attr_accessor :mention_text
|
@@ -2632,6 +2619,12 @@ module Google
|
|
2632
2619
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypePostalAddress]
|
2633
2620
|
attr_accessor :address_value
|
2634
2621
|
|
2622
|
+
# Boolean value. Can be used for entities with binary values, or for checkboxes.
|
2623
|
+
# Corresponds to the JSON property `booleanValue`
|
2624
|
+
# @return [Boolean]
|
2625
|
+
attr_accessor :boolean_value
|
2626
|
+
alias_method :boolean_value?, :boolean_value
|
2627
|
+
|
2635
2628
|
# Represents a whole or partial calendar date, such as a birthday. The time of
|
2636
2629
|
# day and time zone are either specified elsewhere or are insignificant. The
|
2637
2630
|
# date is relative to the Gregorian Calendar. This can represent one of the
|
@@ -2684,6 +2677,7 @@ module Google
|
|
2684
2677
|
# Update properties of this object
|
2685
2678
|
def update!(**args)
|
2686
2679
|
@address_value = args[:address_value] if args.key?(:address_value)
|
2680
|
+
@boolean_value = args[:boolean_value] if args.key?(:boolean_value)
|
2687
2681
|
@date_value = args[:date_value] if args.key?(:date_value)
|
2688
2682
|
@datetime_value = args[:datetime_value] if args.key?(:datetime_value)
|
2689
2683
|
@money_value = args[:money_value] if args.key?(:money_value)
|
@@ -3598,98 +3592,98 @@ module Google
|
|
3598
3592
|
|
3599
3593
|
# Represents a color in the RGBA color space. This representation is designed
|
3600
3594
|
# for simplicity of conversion to/from color representations in various
|
3601
|
-
# languages over compactness
|
3602
|
-
# be trivially provided to the constructor of
|
3603
|
-
# also be trivially provided to UIColor's
|
3595
|
+
# languages over compactness. For example, the fields of this representation can
|
3596
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3597
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3604
3598
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3605
|
-
# CSS
|
3599
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3606
3600
|
# information about the absolute color space that should be used to interpret
|
3607
3601
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3608
|
-
# applications
|
3609
|
-
#
|
3610
|
-
#
|
3611
|
-
#
|
3612
|
-
#
|
3613
|
-
# protocolor.
|
3614
|
-
#
|
3615
|
-
#
|
3616
|
-
# float
|
3617
|
-
# float
|
3618
|
-
#
|
3619
|
-
#
|
3620
|
-
#
|
3621
|
-
#
|
3622
|
-
#
|
3623
|
-
#
|
3624
|
-
#
|
3625
|
-
#
|
3626
|
-
#
|
3627
|
-
#
|
3628
|
-
#
|
3629
|
-
#
|
3630
|
-
#
|
3631
|
-
#
|
3632
|
-
#
|
3602
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3603
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3604
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3605
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3606
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3607
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3608
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3609
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3610
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3611
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3612
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3613
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3614
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3615
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3616
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3617
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3618
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3619
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3620
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3621
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3622
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3623
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3624
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3625
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3626
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3633
3627
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3634
3628
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3635
3629
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3636
|
-
#
|
3630
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3637
3631
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3638
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3639
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3640
|
-
#
|
3641
|
-
#
|
3642
|
-
#
|
3643
|
-
#
|
3632
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3633
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3634
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3635
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3636
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3637
|
+
# / ...
|
3644
3638
|
# Corresponds to the JSON property `backgroundColor`
|
3645
3639
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor]
|
3646
3640
|
attr_accessor :background_color
|
3647
3641
|
|
3648
3642
|
# Represents a color in the RGBA color space. This representation is designed
|
3649
3643
|
# for simplicity of conversion to/from color representations in various
|
3650
|
-
# languages over compactness
|
3651
|
-
# be trivially provided to the constructor of
|
3652
|
-
# also be trivially provided to UIColor's
|
3644
|
+
# languages over compactness. For example, the fields of this representation can
|
3645
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3646
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3653
3647
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3654
|
-
# CSS
|
3648
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3655
3649
|
# information about the absolute color space that should be used to interpret
|
3656
3650
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3657
|
-
# applications
|
3658
|
-
#
|
3659
|
-
#
|
3660
|
-
#
|
3661
|
-
#
|
3662
|
-
# protocolor.
|
3663
|
-
#
|
3664
|
-
#
|
3665
|
-
# float
|
3666
|
-
# float
|
3667
|
-
#
|
3668
|
-
#
|
3669
|
-
#
|
3670
|
-
#
|
3671
|
-
#
|
3672
|
-
#
|
3673
|
-
#
|
3674
|
-
#
|
3675
|
-
#
|
3676
|
-
#
|
3677
|
-
#
|
3678
|
-
#
|
3679
|
-
#
|
3680
|
-
#
|
3681
|
-
#
|
3651
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3652
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3653
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3654
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3655
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3656
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3657
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3658
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3659
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3660
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3661
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3662
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3663
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3664
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3665
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3666
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3667
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3668
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3669
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3670
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3671
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3672
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3673
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3674
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3675
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3682
3676
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3683
3677
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3684
3678
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3685
|
-
#
|
3679
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3686
3680
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3687
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3688
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3689
|
-
#
|
3690
|
-
#
|
3691
|
-
#
|
3692
|
-
#
|
3681
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3682
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3683
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3684
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3685
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3686
|
+
# / ...
|
3693
3687
|
# Corresponds to the JSON property `color`
|
3694
3688
|
# @return [Google::Apis::DocumentaiV1beta2::GoogleTypeColor]
|
3695
3689
|
attr_accessor :color
|
@@ -3847,44 +3841,6 @@ module Google
|
|
3847
3841
|
end
|
3848
3842
|
end
|
3849
3843
|
|
3850
|
-
# A translation of the text segment.
|
3851
|
-
class GoogleCloudDocumentaiV1beta2DocumentTranslation
|
3852
|
-
include Google::Apis::Core::Hashable
|
3853
|
-
|
3854
|
-
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
|
3855
|
-
# see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
3856
|
-
# Corresponds to the JSON property `languageCode`
|
3857
|
-
# @return [String]
|
3858
|
-
attr_accessor :language_code
|
3859
|
-
|
3860
|
-
# The history of this annotation.
|
3861
|
-
# Corresponds to the JSON property `provenance`
|
3862
|
-
# @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentProvenance>]
|
3863
|
-
attr_accessor :provenance
|
3864
|
-
|
3865
|
-
# Text reference indexing into the Document.text.
|
3866
|
-
# Corresponds to the JSON property `textAnchor`
|
3867
|
-
# @return [Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor]
|
3868
|
-
attr_accessor :text_anchor
|
3869
|
-
|
3870
|
-
# Text translated into the target language.
|
3871
|
-
# Corresponds to the JSON property `translatedText`
|
3872
|
-
# @return [String]
|
3873
|
-
attr_accessor :translated_text
|
3874
|
-
|
3875
|
-
def initialize(**args)
|
3876
|
-
update!(**args)
|
3877
|
-
end
|
3878
|
-
|
3879
|
-
# Update properties of this object
|
3880
|
-
def update!(**args)
|
3881
|
-
@language_code = args[:language_code] if args.key?(:language_code)
|
3882
|
-
@provenance = args[:provenance] if args.key?(:provenance)
|
3883
|
-
@text_anchor = args[:text_anchor] if args.key?(:text_anchor)
|
3884
|
-
@translated_text = args[:translated_text] if args.key?(:translated_text)
|
3885
|
-
end
|
3886
|
-
end
|
3887
|
-
|
3888
3844
|
# Parameters to control entity extraction behavior.
|
3889
3845
|
class GoogleCloudDocumentaiV1beta2EntityExtractionParams
|
3890
3846
|
include Google::Apis::Core::Hashable
|
@@ -4061,7 +4017,7 @@ module Google
|
|
4061
4017
|
# @return [Float]
|
4062
4018
|
attr_accessor :x
|
4063
4019
|
|
4064
|
-
# Y coordinate.
|
4020
|
+
# Y coordinate (starts from the top of the image).
|
4065
4021
|
# Corresponds to the JSON property `y`
|
4066
4022
|
# @return [Float]
|
4067
4023
|
attr_accessor :y
|
@@ -4345,7 +4301,7 @@ module Google
|
|
4345
4301
|
# @return [Fixnum]
|
4346
4302
|
attr_accessor :x
|
4347
4303
|
|
4348
|
-
# Y coordinate.
|
4304
|
+
# Y coordinate (starts from the top of the image).
|
4349
4305
|
# Corresponds to the JSON property `y`
|
4350
4306
|
# @return [Fixnum]
|
4351
4307
|
attr_accessor :y
|
@@ -4727,61 +4683,60 @@ module Google
|
|
4727
4683
|
|
4728
4684
|
# Represents a color in the RGBA color space. This representation is designed
|
4729
4685
|
# for simplicity of conversion to/from color representations in various
|
4730
|
-
# languages over compactness
|
4731
|
-
# be trivially provided to the constructor of
|
4732
|
-
# also be trivially provided to UIColor's
|
4686
|
+
# languages over compactness. For example, the fields of this representation can
|
4687
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
4688
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
4733
4689
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
4734
|
-
# CSS
|
4690
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
4735
4691
|
# information about the absolute color space that should be used to interpret
|
4736
4692
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
4737
|
-
# applications
|
4738
|
-
#
|
4739
|
-
#
|
4740
|
-
#
|
4741
|
-
#
|
4742
|
-
# protocolor.
|
4743
|
-
#
|
4744
|
-
#
|
4745
|
-
# float
|
4746
|
-
# float
|
4747
|
-
#
|
4748
|
-
#
|
4749
|
-
#
|
4750
|
-
#
|
4751
|
-
#
|
4752
|
-
#
|
4753
|
-
#
|
4754
|
-
#
|
4755
|
-
#
|
4756
|
-
#
|
4757
|
-
#
|
4758
|
-
#
|
4759
|
-
#
|
4760
|
-
#
|
4761
|
-
#
|
4693
|
+
# applications should assume the sRGB color space. When color equality needs to
|
4694
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
4695
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
4696
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
4697
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
4698
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
4699
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
4700
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
4701
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
4702
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
4703
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
4704
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
4705
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
4706
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
4707
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
4708
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
4709
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
4710
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
4711
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
4712
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
4713
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
4714
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
4715
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
4716
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
4717
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
4762
4718
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
4763
4719
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
4764
4720
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
4765
|
-
#
|
4721
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
4766
4722
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
4767
|
-
# ', alphaFrac, ')'].join(''); `; var
|
4768
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
4769
|
-
#
|
4770
|
-
#
|
4771
|
-
#
|
4772
|
-
#
|
4723
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
4724
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
4725
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
4726
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
4727
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
4728
|
+
# / ...
|
4773
4729
|
class GoogleTypeColor
|
4774
4730
|
include Google::Apis::Core::Hashable
|
4775
4731
|
|
4776
4732
|
# The fraction of this color that should be applied to the pixel. That is, the
|
4777
|
-
# final pixel color is defined by the equation: pixel color = alpha * (this
|
4778
|
-
# color) + (1.0 - alpha) * (background color) This means that a value of 1.0
|
4733
|
+
# final pixel color is defined by the equation: `pixel color = alpha * (this
|
4734
|
+
# color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
|
4779
4735
|
# corresponds to a solid color, whereas a value of 0.0 corresponds to a
|
4780
4736
|
# completely transparent color. This uses a wrapper message rather than a simple
|
4781
4737
|
# float scalar so that it is possible to distinguish between a default value and
|
4782
|
-
# the value being unset. If omitted, this color object is
|
4783
|
-
#
|
4784
|
-
# 0).
|
4738
|
+
# the value being unset. If omitted, this color object is rendered as a solid
|
4739
|
+
# color (as if the alpha value had been explicitly given a value of 1.0).
|
4785
4740
|
# Corresponds to the JSON property `alpha`
|
4786
4741
|
# @return [Float]
|
4787
4742
|
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.8.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 = "20210329"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -100,6 +100,18 @@ module Google
|
|
100
100
|
include Google::Apis::Core::JsonObjectSupport
|
101
101
|
end
|
102
102
|
|
103
|
+
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionResponse
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
103
115
|
class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadata
|
104
116
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
117
|
|
@@ -388,12 +400,6 @@ module Google
|
|
388
400
|
include Google::Apis::Core::JsonObjectSupport
|
389
401
|
end
|
390
402
|
|
391
|
-
class GoogleCloudDocumentaiV1beta1DocumentTranslation
|
392
|
-
class Representation < Google::Apis::Core::JsonRepresentation; end
|
393
|
-
|
394
|
-
include Google::Apis::Core::JsonObjectSupport
|
395
|
-
end
|
396
|
-
|
397
403
|
class GoogleCloudDocumentaiV1beta1GcsDestination
|
398
404
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
399
405
|
|
@@ -664,12 +670,6 @@ module Google
|
|
664
670
|
include Google::Apis::Core::JsonObjectSupport
|
665
671
|
end
|
666
672
|
|
667
|
-
class GoogleCloudDocumentaiV1beta2DocumentTranslation
|
668
|
-
class Representation < Google::Apis::Core::JsonRepresentation; end
|
669
|
-
|
670
|
-
include Google::Apis::Core::JsonObjectSupport
|
671
|
-
end
|
672
|
-
|
673
673
|
class GoogleCloudDocumentaiV1beta2EntityExtractionParams
|
674
674
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
675
675
|
|
@@ -955,6 +955,20 @@ module Google
|
|
955
955
|
end
|
956
956
|
end
|
957
957
|
|
958
|
+
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata
|
959
|
+
# @private
|
960
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
961
|
+
property :common_metadata, as: 'commonMetadata', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata::Representation
|
962
|
+
|
963
|
+
end
|
964
|
+
end
|
965
|
+
|
966
|
+
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionResponse
|
967
|
+
# @private
|
968
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
969
|
+
end
|
970
|
+
end
|
971
|
+
|
958
972
|
class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadata
|
959
973
|
# @private
|
960
974
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -1118,8 +1132,6 @@ module Google
|
|
1118
1132
|
|
1119
1133
|
collection :text_styles, as: 'textStyles', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyle, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentStyle::Representation
|
1120
1134
|
|
1121
|
-
collection :translations, as: 'translations', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation::Representation
|
1122
|
-
|
1123
1135
|
property :uri, as: 'uri'
|
1124
1136
|
end
|
1125
1137
|
end
|
@@ -1151,6 +1163,7 @@ module Google
|
|
1151
1163
|
class Representation < Google::Apis::Core::JsonRepresentation
|
1152
1164
|
property :address_value, as: 'addressValue', class: Google::Apis::DocumentaiV1beta2::GoogleTypePostalAddress, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypePostalAddress::Representation
|
1153
1165
|
|
1166
|
+
property :boolean_value, as: 'booleanValue'
|
1154
1167
|
property :date_value, as: 'dateValue', class: Google::Apis::DocumentaiV1beta2::GoogleTypeDate, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypeDate::Representation
|
1155
1168
|
|
1156
1169
|
property :datetime_value, as: 'datetimeValue', class: Google::Apis::DocumentaiV1beta2::GoogleTypeDateTime, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypeDateTime::Representation
|
@@ -1488,18 +1501,6 @@ module Google
|
|
1488
1501
|
end
|
1489
1502
|
end
|
1490
1503
|
|
1491
|
-
class GoogleCloudDocumentaiV1beta1DocumentTranslation
|
1492
|
-
# @private
|
1493
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
1494
|
-
property :language_code, as: 'languageCode'
|
1495
|
-
collection :provenance, as: 'provenance', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance::Representation
|
1496
|
-
|
1497
|
-
property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor::Representation
|
1498
|
-
|
1499
|
-
property :translated_text, as: 'translatedText'
|
1500
|
-
end
|
1501
|
-
end
|
1502
|
-
|
1503
1504
|
class GoogleCloudDocumentaiV1beta1GcsDestination
|
1504
1505
|
# @private
|
1505
1506
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -1625,8 +1626,6 @@ module Google
|
|
1625
1626
|
|
1626
1627
|
collection :text_styles, as: 'textStyles', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyle, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentStyle::Representation
|
1627
1628
|
|
1628
|
-
collection :translations, as: 'translations', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTranslation, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTranslation::Representation
|
1629
|
-
|
1630
1629
|
property :uri, as: 'uri'
|
1631
1630
|
end
|
1632
1631
|
end
|
@@ -1658,6 +1657,7 @@ module Google
|
|
1658
1657
|
class Representation < Google::Apis::Core::JsonRepresentation
|
1659
1658
|
property :address_value, as: 'addressValue', class: Google::Apis::DocumentaiV1beta2::GoogleTypePostalAddress, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypePostalAddress::Representation
|
1660
1659
|
|
1660
|
+
property :boolean_value, as: 'booleanValue'
|
1661
1661
|
property :date_value, as: 'dateValue', class: Google::Apis::DocumentaiV1beta2::GoogleTypeDate, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypeDate::Representation
|
1662
1662
|
|
1663
1663
|
property :datetime_value, as: 'datetimeValue', class: Google::Apis::DocumentaiV1beta2::GoogleTypeDateTime, decorator: Google::Apis::DocumentaiV1beta2::GoogleTypeDateTime::Representation
|
@@ -2004,18 +2004,6 @@ module Google
|
|
2004
2004
|
end
|
2005
2005
|
end
|
2006
2006
|
|
2007
|
-
class GoogleCloudDocumentaiV1beta2DocumentTranslation
|
2008
|
-
# @private
|
2009
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
2010
|
-
property :language_code, as: 'languageCode'
|
2011
|
-
collection :provenance, as: 'provenance', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentProvenance, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentProvenance::Representation
|
2012
|
-
|
2013
|
-
property :text_anchor, as: 'textAnchor', class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor, decorator: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchor::Representation
|
2014
|
-
|
2015
|
-
property :translated_text, as: 'translatedText'
|
2016
|
-
end
|
2017
|
-
end
|
2018
|
-
|
2019
2007
|
class GoogleCloudDocumentaiV1beta2EntityExtractionParams
|
2020
2008
|
# @private
|
2021
2009
|
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.8.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-04-05 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.8.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: []
|
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
62
|
requirements:
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: '2.
|
65
|
+
version: '2.5'
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.2.
|
72
|
+
rubygems_version: 3.2.13
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Simple REST client for Cloud Document AI API V1beta2
|