google-apis-documentai_v1beta3 0.4.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/lib/google/apis/documentai_v1beta3.rb +1 -1
- data/lib/google/apis/documentai_v1beta3/classes.rb +324 -428
- data/lib/google/apis/documentai_v1beta3/gem_version.rb +3 -3
- data/lib/google/apis/documentai_v1beta3/representations.rb +26 -60
- data/lib/google/apis/documentai_v1beta3/service.rb +13 -7
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f47eb993a9e4dccd9f637947d7f6207c9f3d866b503c6f7f0181b9e4f5ce0b1c
|
4
|
+
data.tar.gz: '08c64bb4c92ceb007df09cd5f9bcf042a4ad915fe0a4cece3f01f666eb75e5d4'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37533a944fa8050789d9bcaffb605c88bd3845afebd285e66964b5022eaeec5aa1d118c54494cdf2621a1512dd8cef98418be2d13ba79da4826aac583c76f9ef
|
7
|
+
data.tar.gz: 3f0483bf770e0ef4019e6bd79f9fec2027e82159cb6f8c7dacc3686fad6df329a92ba1977d5e699cb354ac1f73d7e20d3f2f5589d8e3c257f41ae1f8652b67a4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Release history for google-apis-documentai_v1beta3
|
2
2
|
|
3
|
+
### v0.9.0 (2021-03-31)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210329
|
6
|
+
|
7
|
+
### v0.8.0 (2021-03-24)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20210320
|
10
|
+
|
11
|
+
### v0.7.0 (2021-03-16)
|
12
|
+
|
13
|
+
* Regenerated from discovery document revision 20210312
|
14
|
+
|
15
|
+
### v0.6.0 (2021-03-09)
|
16
|
+
|
17
|
+
* Regenerated from discovery document revision 20210308
|
18
|
+
* Regenerated using generator version 0.2.0
|
19
|
+
|
20
|
+
### v0.5.0 (2021-03-04)
|
21
|
+
|
22
|
+
* Regenerated from discovery document revision 20210226
|
23
|
+
|
3
24
|
### v0.4.0 (2021-02-24)
|
4
25
|
|
5
26
|
* Regenerated from discovery document revision 20210222
|
@@ -31,7 +31,7 @@ module Google
|
|
31
31
|
# This is NOT the gem version.
|
32
32
|
VERSION = 'V1beta3'
|
33
33
|
|
34
|
-
#
|
34
|
+
# See, edit, configure, and delete your Google Cloud Platform data
|
35
35
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
36
36
|
end
|
37
37
|
end
|
@@ -271,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::DocumentaiV1beta3::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata]
|
281
|
+
attr_accessor :common_metadata
|
282
|
+
|
283
|
+
def initialize(**args)
|
284
|
+
update!(**args)
|
285
|
+
end
|
286
|
+
|
287
|
+
# Update properties of this object
|
288
|
+
def update!(**args)
|
289
|
+
@common_metadata = args[:common_metadata] if args.key?(:common_metadata)
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
# 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::DocumentaiV1beta3::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::DocumentaiV1beta3::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
|
@@ -1832,98 +1857,98 @@ module Google
|
|
1832
1857
|
|
1833
1858
|
# Represents a color in the RGBA color space. This representation is designed
|
1834
1859
|
# for simplicity of conversion to/from color representations in various
|
1835
|
-
# languages over compactness
|
1836
|
-
# be trivially provided to the constructor of
|
1837
|
-
# 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`
|
1838
1863
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1839
|
-
# CSS
|
1864
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1840
1865
|
# information about the absolute color space that should be used to interpret
|
1841
1866
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1842
|
-
# applications
|
1843
|
-
#
|
1844
|
-
#
|
1845
|
-
#
|
1846
|
-
#
|
1847
|
-
# protocolor.
|
1848
|
-
#
|
1849
|
-
#
|
1850
|
-
# float
|
1851
|
-
# float
|
1852
|
-
#
|
1853
|
-
#
|
1854
|
-
#
|
1855
|
-
#
|
1856
|
-
#
|
1857
|
-
#
|
1858
|
-
#
|
1859
|
-
#
|
1860
|
-
#
|
1861
|
-
#
|
1862
|
-
#
|
1863
|
-
#
|
1864
|
-
#
|
1865
|
-
#
|
1866
|
-
#
|
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;
|
1867
1892
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1868
1893
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1869
1894
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1870
|
-
#
|
1895
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1871
1896
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1872
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1873
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1874
|
-
#
|
1875
|
-
#
|
1876
|
-
#
|
1877
|
-
#
|
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
|
+
# / ...
|
1878
1903
|
# Corresponds to the JSON property `backgroundColor`
|
1879
1904
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
1880
1905
|
attr_accessor :background_color
|
1881
1906
|
|
1882
1907
|
# Represents a color in the RGBA color space. This representation is designed
|
1883
1908
|
# for simplicity of conversion to/from color representations in various
|
1884
|
-
# languages over compactness
|
1885
|
-
# be trivially provided to the constructor of
|
1886
|
-
# 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`
|
1887
1912
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1888
|
-
# CSS
|
1913
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1889
1914
|
# information about the absolute color space that should be used to interpret
|
1890
1915
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1891
|
-
# applications
|
1892
|
-
#
|
1893
|
-
#
|
1894
|
-
#
|
1895
|
-
#
|
1896
|
-
# protocolor.
|
1897
|
-
#
|
1898
|
-
#
|
1899
|
-
# float
|
1900
|
-
# float
|
1901
|
-
#
|
1902
|
-
#
|
1903
|
-
#
|
1904
|
-
#
|
1905
|
-
#
|
1906
|
-
#
|
1907
|
-
#
|
1908
|
-
#
|
1909
|
-
#
|
1910
|
-
#
|
1911
|
-
#
|
1912
|
-
#
|
1913
|
-
#
|
1914
|
-
#
|
1915
|
-
#
|
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;
|
1916
1941
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1917
1942
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1918
1943
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1919
|
-
#
|
1944
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1920
1945
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1921
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1922
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1923
|
-
#
|
1924
|
-
#
|
1925
|
-
#
|
1926
|
-
#
|
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
|
+
# / ...
|
1927
1952
|
# Corresponds to the JSON property `color`
|
1928
1953
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
1929
1954
|
attr_accessor :color
|
@@ -2081,44 +2106,6 @@ module Google
|
|
2081
2106
|
end
|
2082
2107
|
end
|
2083
2108
|
|
2084
|
-
# A translation of the text segment.
|
2085
|
-
class GoogleCloudDocumentaiV1beta1DocumentTranslation
|
2086
|
-
include Google::Apis::Core::Hashable
|
2087
|
-
|
2088
|
-
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
|
2089
|
-
# see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
2090
|
-
# Corresponds to the JSON property `languageCode`
|
2091
|
-
# @return [String]
|
2092
|
-
attr_accessor :language_code
|
2093
|
-
|
2094
|
-
# The history of this annotation.
|
2095
|
-
# Corresponds to the JSON property `provenance`
|
2096
|
-
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance>]
|
2097
|
-
attr_accessor :provenance
|
2098
|
-
|
2099
|
-
# Text reference indexing into the Document.text.
|
2100
|
-
# Corresponds to the JSON property `textAnchor`
|
2101
|
-
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
|
2102
|
-
attr_accessor :text_anchor
|
2103
|
-
|
2104
|
-
# Text translated into the target language.
|
2105
|
-
# Corresponds to the JSON property `translatedText`
|
2106
|
-
# @return [String]
|
2107
|
-
attr_accessor :translated_text
|
2108
|
-
|
2109
|
-
def initialize(**args)
|
2110
|
-
update!(**args)
|
2111
|
-
end
|
2112
|
-
|
2113
|
-
# Update properties of this object
|
2114
|
-
def update!(**args)
|
2115
|
-
@language_code = args[:language_code] if args.key?(:language_code)
|
2116
|
-
@provenance = args[:provenance] if args.key?(:provenance)
|
2117
|
-
@text_anchor = args[:text_anchor] if args.key?(:text_anchor)
|
2118
|
-
@translated_text = args[:translated_text] if args.key?(:translated_text)
|
2119
|
-
end
|
2120
|
-
end
|
2121
|
-
|
2122
2109
|
# The Google Cloud Storage location where the output file will be written to.
|
2123
2110
|
class GoogleCloudDocumentaiV1beta1GcsDestination
|
2124
2111
|
include Google::Apis::Core::Hashable
|
@@ -2195,7 +2182,7 @@ module Google
|
|
2195
2182
|
# @return [Float]
|
2196
2183
|
attr_accessor :x
|
2197
2184
|
|
2198
|
-
# Y coordinate.
|
2185
|
+
# Y coordinate (starts from the top of the image).
|
2199
2186
|
# Corresponds to the JSON property `y`
|
2200
2187
|
# @return [Float]
|
2201
2188
|
attr_accessor :y
|
@@ -2316,7 +2303,7 @@ module Google
|
|
2316
2303
|
# @return [Fixnum]
|
2317
2304
|
attr_accessor :x
|
2318
2305
|
|
2319
|
-
# Y coordinate.
|
2306
|
+
# Y coordinate (starts from the top of the image).
|
2320
2307
|
# Corresponds to the JSON property `y`
|
2321
2308
|
# @return [Fixnum]
|
2322
2309
|
attr_accessor :y
|
@@ -2384,9 +2371,9 @@ module Google
|
|
2384
2371
|
class GoogleCloudDocumentaiV1beta2Document
|
2385
2372
|
include Google::Apis::Core::Hashable
|
2386
2373
|
|
2387
|
-
# Inline document content, represented as a stream of bytes. Note: As
|
2388
|
-
# bytes` fields, protobuffers use a pure binary representation,
|
2389
|
-
# representations use base64.
|
2374
|
+
# Optional. Inline document content, represented as a stream of bytes. Note: As
|
2375
|
+
# with all `bytes` fields, protobuffers use a pure binary representation,
|
2376
|
+
# whereas JSON representations use base64.
|
2390
2377
|
# Corresponds to the JSON property `content`
|
2391
2378
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2392
2379
|
# @return [String]
|
@@ -2441,7 +2428,7 @@ module Google
|
|
2441
2428
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentShardInfo]
|
2442
2429
|
attr_accessor :shard_info
|
2443
2430
|
|
2444
|
-
# UTF-8 encoded text in reading order from the document.
|
2431
|
+
# Optional. UTF-8 encoded text in reading order from the document.
|
2445
2432
|
# Corresponds to the JSON property `text`
|
2446
2433
|
# @return [String]
|
2447
2434
|
attr_accessor :text
|
@@ -2458,16 +2445,10 @@ module Google
|
|
2458
2445
|
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentStyle>]
|
2459
2446
|
attr_accessor :text_styles
|
2460
2447
|
|
2461
|
-
#
|
2462
|
-
#
|
2463
|
-
#
|
2464
|
-
#
|
2465
|
-
attr_accessor :translations
|
2466
|
-
|
2467
|
-
# Currently supports Google Cloud Storage URI of the form `gs://bucket_name/
|
2468
|
-
# object_name`. Object versioning is not supported. See [Google Cloud Storage
|
2469
|
-
# Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
2470
|
-
# info.
|
2448
|
+
# Optional. Currently supports Google Cloud Storage URI of the form `gs://
|
2449
|
+
# bucket_name/object_name`. Object versioning is not supported. See [Google
|
2450
|
+
# Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-
|
2451
|
+
# uris) for more info.
|
2471
2452
|
# Corresponds to the JSON property `uri`
|
2472
2453
|
# @return [String]
|
2473
2454
|
attr_accessor :uri
|
@@ -2490,7 +2471,6 @@ module Google
|
|
2490
2471
|
@text = args[:text] if args.key?(:text)
|
2491
2472
|
@text_changes = args[:text_changes] if args.key?(:text_changes)
|
2492
2473
|
@text_styles = args[:text_styles] if args.key?(:text_styles)
|
2493
|
-
@translations = args[:translations] if args.key?(:translations)
|
2494
2474
|
@uri = args[:uri] if args.key?(:uri)
|
2495
2475
|
end
|
2496
2476
|
end
|
@@ -2511,12 +2491,12 @@ module Google
|
|
2511
2491
|
# @return [String]
|
2512
2492
|
attr_accessor :id
|
2513
2493
|
|
2514
|
-
# Deprecated. Use `id` field instead.
|
2494
|
+
# Optional. Deprecated. Use `id` field instead.
|
2515
2495
|
# Corresponds to the JSON property `mentionId`
|
2516
2496
|
# @return [String]
|
2517
2497
|
attr_accessor :mention_id
|
2518
2498
|
|
2519
|
-
# Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
2499
|
+
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
2520
2500
|
# Corresponds to the JSON property `mentionText`
|
2521
2501
|
# @return [String]
|
2522
2502
|
attr_accessor :mention_text
|
@@ -3572,98 +3552,98 @@ module Google
|
|
3572
3552
|
|
3573
3553
|
# Represents a color in the RGBA color space. This representation is designed
|
3574
3554
|
# for simplicity of conversion to/from color representations in various
|
3575
|
-
# languages over compactness
|
3576
|
-
# be trivially provided to the constructor of
|
3577
|
-
# also be trivially provided to UIColor's
|
3555
|
+
# languages over compactness. For example, the fields of this representation can
|
3556
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3557
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3578
3558
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3579
|
-
# CSS
|
3559
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3580
3560
|
# information about the absolute color space that should be used to interpret
|
3581
3561
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3582
|
-
# applications
|
3583
|
-
#
|
3584
|
-
#
|
3585
|
-
#
|
3586
|
-
#
|
3587
|
-
# protocolor.
|
3588
|
-
#
|
3589
|
-
#
|
3590
|
-
# float
|
3591
|
-
# float
|
3592
|
-
#
|
3593
|
-
#
|
3594
|
-
#
|
3595
|
-
#
|
3596
|
-
#
|
3597
|
-
#
|
3598
|
-
#
|
3599
|
-
#
|
3600
|
-
#
|
3601
|
-
#
|
3602
|
-
#
|
3603
|
-
#
|
3604
|
-
#
|
3605
|
-
#
|
3606
|
-
#
|
3562
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3563
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3564
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3565
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3566
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3567
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3568
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3569
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3570
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3571
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3572
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3573
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3574
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3575
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3576
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3577
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3578
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3579
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3580
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3581
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3582
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3583
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3584
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3585
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3586
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3607
3587
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3608
3588
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3609
3589
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3610
|
-
#
|
3590
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3611
3591
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3612
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3613
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3614
|
-
#
|
3615
|
-
#
|
3616
|
-
#
|
3617
|
-
#
|
3592
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3593
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3594
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3595
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3596
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3597
|
+
# / ...
|
3618
3598
|
# Corresponds to the JSON property `backgroundColor`
|
3619
3599
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
3620
3600
|
attr_accessor :background_color
|
3621
3601
|
|
3622
3602
|
# Represents a color in the RGBA color space. This representation is designed
|
3623
3603
|
# for simplicity of conversion to/from color representations in various
|
3624
|
-
# languages over compactness
|
3625
|
-
# be trivially provided to the constructor of
|
3626
|
-
# also be trivially provided to UIColor's
|
3604
|
+
# languages over compactness. For example, the fields of this representation can
|
3605
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3606
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3627
3607
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3628
|
-
# CSS
|
3608
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3629
3609
|
# information about the absolute color space that should be used to interpret
|
3630
3610
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3631
|
-
# applications
|
3632
|
-
#
|
3633
|
-
#
|
3634
|
-
#
|
3635
|
-
#
|
3636
|
-
# protocolor.
|
3637
|
-
#
|
3638
|
-
#
|
3639
|
-
# float
|
3640
|
-
# float
|
3641
|
-
#
|
3642
|
-
#
|
3643
|
-
#
|
3644
|
-
#
|
3645
|
-
#
|
3646
|
-
#
|
3647
|
-
#
|
3648
|
-
#
|
3649
|
-
#
|
3650
|
-
#
|
3651
|
-
#
|
3652
|
-
#
|
3653
|
-
#
|
3654
|
-
#
|
3655
|
-
#
|
3611
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3612
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3613
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3614
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3615
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3616
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3617
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3618
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3619
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3620
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3621
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3622
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3623
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3624
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3625
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3626
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3627
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3628
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3629
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3630
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3631
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3632
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3633
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3634
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3635
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3656
3636
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3657
3637
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3658
3638
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3659
|
-
#
|
3639
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3660
3640
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3661
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3662
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3663
|
-
#
|
3664
|
-
#
|
3665
|
-
#
|
3666
|
-
#
|
3641
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3642
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3643
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3644
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3645
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3646
|
+
# / ...
|
3667
3647
|
# Corresponds to the JSON property `color`
|
3668
3648
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
3669
3649
|
attr_accessor :color
|
@@ -3821,44 +3801,6 @@ module Google
|
|
3821
3801
|
end
|
3822
3802
|
end
|
3823
3803
|
|
3824
|
-
# A translation of the text segment.
|
3825
|
-
class GoogleCloudDocumentaiV1beta2DocumentTranslation
|
3826
|
-
include Google::Apis::Core::Hashable
|
3827
|
-
|
3828
|
-
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
|
3829
|
-
# see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
3830
|
-
# Corresponds to the JSON property `languageCode`
|
3831
|
-
# @return [String]
|
3832
|
-
attr_accessor :language_code
|
3833
|
-
|
3834
|
-
# The history of this annotation.
|
3835
|
-
# Corresponds to the JSON property `provenance`
|
3836
|
-
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentProvenance>]
|
3837
|
-
attr_accessor :provenance
|
3838
|
-
|
3839
|
-
# Text reference indexing into the Document.text.
|
3840
|
-
# Corresponds to the JSON property `textAnchor`
|
3841
|
-
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentTextAnchor]
|
3842
|
-
attr_accessor :text_anchor
|
3843
|
-
|
3844
|
-
# Text translated into the target language.
|
3845
|
-
# Corresponds to the JSON property `translatedText`
|
3846
|
-
# @return [String]
|
3847
|
-
attr_accessor :translated_text
|
3848
|
-
|
3849
|
-
def initialize(**args)
|
3850
|
-
update!(**args)
|
3851
|
-
end
|
3852
|
-
|
3853
|
-
# Update properties of this object
|
3854
|
-
def update!(**args)
|
3855
|
-
@language_code = args[:language_code] if args.key?(:language_code)
|
3856
|
-
@provenance = args[:provenance] if args.key?(:provenance)
|
3857
|
-
@text_anchor = args[:text_anchor] if args.key?(:text_anchor)
|
3858
|
-
@translated_text = args[:translated_text] if args.key?(:translated_text)
|
3859
|
-
end
|
3860
|
-
end
|
3861
|
-
|
3862
3804
|
# The Google Cloud Storage location where the output file will be written to.
|
3863
3805
|
class GoogleCloudDocumentaiV1beta2GcsDestination
|
3864
3806
|
include Google::Apis::Core::Hashable
|
@@ -3945,7 +3887,7 @@ module Google
|
|
3945
3887
|
# @return [Float]
|
3946
3888
|
attr_accessor :x
|
3947
3889
|
|
3948
|
-
# Y coordinate.
|
3890
|
+
# Y coordinate (starts from the top of the image).
|
3949
3891
|
# Corresponds to the JSON property `y`
|
3950
3892
|
# @return [Float]
|
3951
3893
|
attr_accessor :y
|
@@ -4066,7 +4008,7 @@ module Google
|
|
4066
4008
|
# @return [Fixnum]
|
4067
4009
|
attr_accessor :x
|
4068
4010
|
|
4069
|
-
# Y coordinate.
|
4011
|
+
# Y coordinate (starts from the top of the image).
|
4070
4012
|
# Corresponds to the JSON property `y`
|
4071
4013
|
# @return [Fixnum]
|
4072
4014
|
attr_accessor :y
|
@@ -4380,9 +4322,9 @@ module Google
|
|
4380
4322
|
class GoogleCloudDocumentaiV1beta3Document
|
4381
4323
|
include Google::Apis::Core::Hashable
|
4382
4324
|
|
4383
|
-
# Inline document content, represented as a stream of bytes. Note: As
|
4384
|
-
# bytes` fields, protobuffers use a pure binary representation,
|
4385
|
-
# representations use base64.
|
4325
|
+
# Optional. Inline document content, represented as a stream of bytes. Note: As
|
4326
|
+
# with all `bytes` fields, protobuffers use a pure binary representation,
|
4327
|
+
# whereas JSON representations use base64.
|
4386
4328
|
# Corresponds to the JSON property `content`
|
4387
4329
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
4388
4330
|
# @return [String]
|
@@ -4432,7 +4374,7 @@ module Google
|
|
4432
4374
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentShardInfo]
|
4433
4375
|
attr_accessor :shard_info
|
4434
4376
|
|
4435
|
-
# UTF-8 encoded text in reading order from the document.
|
4377
|
+
# Optional. UTF-8 encoded text in reading order from the document.
|
4436
4378
|
# Corresponds to the JSON property `text`
|
4437
4379
|
# @return [String]
|
4438
4380
|
attr_accessor :text
|
@@ -4449,16 +4391,10 @@ module Google
|
|
4449
4391
|
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentStyle>]
|
4450
4392
|
attr_accessor :text_styles
|
4451
4393
|
|
4452
|
-
#
|
4453
|
-
#
|
4454
|
-
#
|
4455
|
-
#
|
4456
|
-
attr_accessor :translations
|
4457
|
-
|
4458
|
-
# Currently supports Google Cloud Storage URI of the form `gs://bucket_name/
|
4459
|
-
# object_name`. Object versioning is not supported. See [Google Cloud Storage
|
4460
|
-
# Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
4461
|
-
# info.
|
4394
|
+
# Optional. Currently supports Google Cloud Storage URI of the form `gs://
|
4395
|
+
# bucket_name/object_name`. Object versioning is not supported. See [Google
|
4396
|
+
# Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-
|
4397
|
+
# uris) for more info.
|
4462
4398
|
# Corresponds to the JSON property `uri`
|
4463
4399
|
# @return [String]
|
4464
4400
|
attr_accessor :uri
|
@@ -4480,7 +4416,6 @@ module Google
|
|
4480
4416
|
@text = args[:text] if args.key?(:text)
|
4481
4417
|
@text_changes = args[:text_changes] if args.key?(:text_changes)
|
4482
4418
|
@text_styles = args[:text_styles] if args.key?(:text_styles)
|
4483
|
-
@translations = args[:translations] if args.key?(:translations)
|
4484
4419
|
@uri = args[:uri] if args.key?(:uri)
|
4485
4420
|
end
|
4486
4421
|
end
|
@@ -4501,12 +4436,12 @@ module Google
|
|
4501
4436
|
# @return [String]
|
4502
4437
|
attr_accessor :id
|
4503
4438
|
|
4504
|
-
# Deprecated. Use `id` field instead.
|
4439
|
+
# Optional. Deprecated. Use `id` field instead.
|
4505
4440
|
# Corresponds to the JSON property `mentionId`
|
4506
4441
|
# @return [String]
|
4507
4442
|
attr_accessor :mention_id
|
4508
4443
|
|
4509
|
-
# Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
4444
|
+
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
4510
4445
|
# Corresponds to the JSON property `mentionText`
|
4511
4446
|
# @return [String]
|
4512
4447
|
attr_accessor :mention_text
|
@@ -5564,98 +5499,98 @@ module Google
|
|
5564
5499
|
|
5565
5500
|
# Represents a color in the RGBA color space. This representation is designed
|
5566
5501
|
# for simplicity of conversion to/from color representations in various
|
5567
|
-
# languages over compactness
|
5568
|
-
# be trivially provided to the constructor of
|
5569
|
-
# also be trivially provided to UIColor's
|
5502
|
+
# languages over compactness. For example, the fields of this representation can
|
5503
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5504
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5570
5505
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5571
|
-
# CSS
|
5506
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5572
5507
|
# information about the absolute color space that should be used to interpret
|
5573
5508
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
5574
|
-
# applications
|
5575
|
-
#
|
5576
|
-
#
|
5577
|
-
#
|
5578
|
-
#
|
5579
|
-
# protocolor.
|
5580
|
-
#
|
5581
|
-
#
|
5582
|
-
# float
|
5583
|
-
# float
|
5584
|
-
#
|
5585
|
-
#
|
5586
|
-
#
|
5587
|
-
#
|
5588
|
-
#
|
5589
|
-
#
|
5590
|
-
#
|
5591
|
-
#
|
5592
|
-
#
|
5593
|
-
#
|
5594
|
-
#
|
5595
|
-
#
|
5596
|
-
#
|
5597
|
-
#
|
5598
|
-
#
|
5509
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5510
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5511
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5512
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5513
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5514
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5515
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5516
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5517
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5518
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5519
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5520
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5521
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5522
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5523
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5524
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5525
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5526
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5527
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5528
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5529
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5530
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5531
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5532
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5533
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5599
5534
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5600
5535
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5601
5536
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5602
|
-
#
|
5537
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5603
5538
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
5604
|
-
# ', alphaFrac, ')'].join(''); `; var
|
5605
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
5606
|
-
#
|
5607
|
-
#
|
5608
|
-
#
|
5609
|
-
#
|
5539
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5540
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5541
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5542
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5543
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5544
|
+
# / ...
|
5610
5545
|
# Corresponds to the JSON property `backgroundColor`
|
5611
5546
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
5612
5547
|
attr_accessor :background_color
|
5613
5548
|
|
5614
5549
|
# Represents a color in the RGBA color space. This representation is designed
|
5615
5550
|
# for simplicity of conversion to/from color representations in various
|
5616
|
-
# languages over compactness
|
5617
|
-
# be trivially provided to the constructor of
|
5618
|
-
# also be trivially provided to UIColor's
|
5551
|
+
# languages over compactness. For example, the fields of this representation can
|
5552
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5553
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5619
5554
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5620
|
-
# CSS
|
5555
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5621
5556
|
# information about the absolute color space that should be used to interpret
|
5622
5557
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
5623
|
-
# applications
|
5624
|
-
#
|
5625
|
-
#
|
5626
|
-
#
|
5627
|
-
#
|
5628
|
-
# protocolor.
|
5629
|
-
#
|
5630
|
-
#
|
5631
|
-
# float
|
5632
|
-
# float
|
5633
|
-
#
|
5634
|
-
#
|
5635
|
-
#
|
5636
|
-
#
|
5637
|
-
#
|
5638
|
-
#
|
5639
|
-
#
|
5640
|
-
#
|
5641
|
-
#
|
5642
|
-
#
|
5643
|
-
#
|
5644
|
-
#
|
5645
|
-
#
|
5646
|
-
#
|
5647
|
-
#
|
5558
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5559
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5560
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5561
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5562
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5563
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5564
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5565
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5566
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5567
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5568
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5569
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5570
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5571
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5572
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5573
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5574
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5575
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5576
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5577
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5578
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5579
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5580
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5581
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5582
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5648
5583
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5649
5584
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5650
5585
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5651
|
-
#
|
5586
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5652
5587
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
5653
|
-
# ', alphaFrac, ')'].join(''); `; var
|
5654
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
5655
|
-
#
|
5656
|
-
#
|
5657
|
-
#
|
5658
|
-
#
|
5588
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5589
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5590
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5591
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5592
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5593
|
+
# / ...
|
5659
5594
|
# Corresponds to the JSON property `color`
|
5660
5595
|
# @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
|
5661
5596
|
attr_accessor :color
|
@@ -5813,44 +5748,6 @@ module Google
|
|
5813
5748
|
end
|
5814
5749
|
end
|
5815
5750
|
|
5816
|
-
# A translation of the text segment.
|
5817
|
-
class GoogleCloudDocumentaiV1beta3DocumentTranslation
|
5818
|
-
include Google::Apis::Core::Hashable
|
5819
|
-
|
5820
|
-
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
|
5821
|
-
# see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
5822
|
-
# Corresponds to the JSON property `languageCode`
|
5823
|
-
# @return [String]
|
5824
|
-
attr_accessor :language_code
|
5825
|
-
|
5826
|
-
# The history of this annotation.
|
5827
|
-
# Corresponds to the JSON property `provenance`
|
5828
|
-
# @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentProvenance>]
|
5829
|
-
attr_accessor :provenance
|
5830
|
-
|
5831
|
-
# Text reference indexing into the Document.text.
|
5832
|
-
# Corresponds to the JSON property `textAnchor`
|
5833
|
-
# @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentTextAnchor]
|
5834
|
-
attr_accessor :text_anchor
|
5835
|
-
|
5836
|
-
# Text translated into the target language.
|
5837
|
-
# Corresponds to the JSON property `translatedText`
|
5838
|
-
# @return [String]
|
5839
|
-
attr_accessor :translated_text
|
5840
|
-
|
5841
|
-
def initialize(**args)
|
5842
|
-
update!(**args)
|
5843
|
-
end
|
5844
|
-
|
5845
|
-
# Update properties of this object
|
5846
|
-
def update!(**args)
|
5847
|
-
@language_code = args[:language_code] if args.key?(:language_code)
|
5848
|
-
@provenance = args[:provenance] if args.key?(:provenance)
|
5849
|
-
@text_anchor = args[:text_anchor] if args.key?(:text_anchor)
|
5850
|
-
@translated_text = args[:translated_text] if args.key?(:translated_text)
|
5851
|
-
end
|
5852
|
-
end
|
5853
|
-
|
5854
5751
|
# Specifies a document stored on Cloud Storage.
|
5855
5752
|
class GoogleCloudDocumentaiV1beta3GcsDocument
|
5856
5753
|
include Google::Apis::Core::Hashable
|
@@ -5958,7 +5855,7 @@ module Google
|
|
5958
5855
|
# @return [Float]
|
5959
5856
|
attr_accessor :x
|
5960
5857
|
|
5961
|
-
# Y coordinate.
|
5858
|
+
# Y coordinate (starts from the top of the image).
|
5962
5859
|
# Corresponds to the JSON property `y`
|
5963
5860
|
# @return [Float]
|
5964
5861
|
attr_accessor :y
|
@@ -6186,7 +6083,7 @@ module Google
|
|
6186
6083
|
# @return [Fixnum]
|
6187
6084
|
attr_accessor :x
|
6188
6085
|
|
6189
|
-
# Y coordinate.
|
6086
|
+
# Y coordinate (starts from the top of the image).
|
6190
6087
|
# Corresponds to the JSON property `y`
|
6191
6088
|
# @return [Fixnum]
|
6192
6089
|
attr_accessor :y
|
@@ -6394,61 +6291,60 @@ module Google
|
|
6394
6291
|
|
6395
6292
|
# Represents a color in the RGBA color space. This representation is designed
|
6396
6293
|
# for simplicity of conversion to/from color representations in various
|
6397
|
-
# languages over compactness
|
6398
|
-
# be trivially provided to the constructor of
|
6399
|
-
# also be trivially provided to UIColor's
|
6294
|
+
# languages over compactness. For example, the fields of this representation can
|
6295
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6296
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6400
6297
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6401
|
-
# CSS
|
6298
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6402
6299
|
# information about the absolute color space that should be used to interpret
|
6403
6300
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6404
|
-
# applications
|
6405
|
-
#
|
6406
|
-
#
|
6407
|
-
#
|
6408
|
-
#
|
6409
|
-
# protocolor.
|
6410
|
-
#
|
6411
|
-
#
|
6412
|
-
# float
|
6413
|
-
# float
|
6414
|
-
#
|
6415
|
-
#
|
6416
|
-
#
|
6417
|
-
#
|
6418
|
-
#
|
6419
|
-
#
|
6420
|
-
#
|
6421
|
-
#
|
6422
|
-
#
|
6423
|
-
#
|
6424
|
-
#
|
6425
|
-
#
|
6426
|
-
#
|
6427
|
-
#
|
6428
|
-
#
|
6301
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6302
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6303
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6304
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6305
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6306
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6307
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6308
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6309
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6310
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6311
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6312
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6313
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6314
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6315
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6316
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6317
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6318
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6319
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6320
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6321
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6322
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6323
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6324
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6325
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6429
6326
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6430
6327
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6431
6328
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6432
|
-
#
|
6329
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6433
6330
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6434
|
-
# ', alphaFrac, ')'].join(''); `; var
|
6435
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
6436
|
-
#
|
6437
|
-
#
|
6438
|
-
#
|
6439
|
-
#
|
6331
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6332
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6333
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6334
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6335
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6336
|
+
# / ...
|
6440
6337
|
class GoogleTypeColor
|
6441
6338
|
include Google::Apis::Core::Hashable
|
6442
6339
|
|
6443
6340
|
# The fraction of this color that should be applied to the pixel. That is, the
|
6444
|
-
# final pixel color is defined by the equation: pixel color = alpha * (this
|
6445
|
-
# color) + (1.0 - alpha) * (background color) This means that a value of 1.0
|
6341
|
+
# final pixel color is defined by the equation: `pixel color = alpha * (this
|
6342
|
+
# color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
|
6446
6343
|
# corresponds to a solid color, whereas a value of 0.0 corresponds to a
|
6447
6344
|
# completely transparent color. This uses a wrapper message rather than a simple
|
6448
6345
|
# float scalar so that it is possible to distinguish between a default value and
|
6449
|
-
# the value being unset. If omitted, this color object is
|
6450
|
-
#
|
6451
|
-
# 0).
|
6346
|
+
# the value being unset. If omitted, this color object is rendered as a solid
|
6347
|
+
# color (as if the alpha value had been explicitly given a value of 1.0).
|
6452
6348
|
# Corresponds to the JSON property `alpha`
|
6453
6349
|
# @return [Float]
|
6454
6350
|
attr_accessor :alpha
|