google-apis-documentai_v1beta2 0.3.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29b7484db6207aad4525be184d5a8b1a31fd2a45bf9828f8ae14c781c86b945b
4
- data.tar.gz: 84662a049c3f07c5942b6fed5c5ab6b2ce664d03318bed544ab3e992960c4edc
3
+ metadata.gz: 705924780649685c53473ec217eb0c74a1c82047c2832b253dc79eba77e2ad30
4
+ data.tar.gz: 66cd77361e2f8c3ce89bf3e352073542b069883b18c2e64ca8fd4b2536faa12d
5
5
  SHA512:
6
- metadata.gz: 9b3851ef565b0667445b88fe093a1495cc731062d00af2e187bae7320ab5c1574a16ef75184160869d82cf344106923d68ce14f36cb736575f5a25b7f5d22585
7
- data.tar.gz: 8a394ade0c82b58eeaa00a237b0fd6524a0e1bfb1b5b5aca1d1501998851f41fd3de8b45e8b6066f1161ac4c6acc8abcd8a9090c73884af0b4ab447282b82589
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
- # View and manage your data across Google Cloud Platform services
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 with all `
691
- # bytes` fields, protobuffers use a pure binary representation, whereas JSON
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
- # A list of translations on Document.text. For document shards, translations in
760
- # this list may cross shard boundaries.
761
- # Corresponds to the JSON property `translations`
762
- # @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTranslation>]
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; for example, the fields of this representation can
1829
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
1830
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
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 "rgba()" string in JavaScript, as well. Note: this proto does not carry
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 SHOULD assume the sRGB color space. Note: when color equality
1836
- # needs to be decided, implementations, unless documented otherwise, will treat
1837
- # two colors to be equal if all their red, green, blue and alpha values each
1838
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
1839
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
1840
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
1841
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
1842
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
1843
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
1844
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
1845
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
1846
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
1847
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
1848
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
1849
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
1850
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
1851
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
1852
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
1853
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
1854
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
1855
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
1856
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
1857
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
1858
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
1859
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
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
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
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 rgbToCssColor_ = function(red, green, blue)
1866
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
1867
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
1868
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
1869
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
1870
- # join(''); `; // ...
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; for example, the fields of this representation can
1878
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
1879
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
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 "rgba()" string in JavaScript, as well. Note: this proto does not carry
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 SHOULD assume the sRGB color space. Note: when color equality
1885
- # needs to be decided, implementations, unless documented otherwise, will treat
1886
- # two colors to be equal if all their red, green, blue and alpha values each
1887
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
1888
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
1889
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
1890
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
1891
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
1892
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
1893
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
1894
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
1895
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
1896
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
1897
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
1898
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
1899
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
1900
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
1901
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
1902
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
1903
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
1904
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
1905
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
1906
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
1907
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
1908
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
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
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
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 rgbToCssColor_ = function(red, green, blue)
1915
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
1916
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
1917
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
1918
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
1919
- # join(''); `; // ...
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 with all `
2421
- # bytes` fields, protobuffers use a pure binary representation, whereas JSON
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
- # A list of translations on Document.text. For document shards, translations in
2495
- # this list may cross shard boundaries.
2496
- # Corresponds to the JSON property `translations`
2497
- # @return [Array<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTranslation>]
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; for example, the fields of this representation can
3602
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
3603
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
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 "rgba()" string in JavaScript, as well. Note: this proto does not carry
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 SHOULD assume the sRGB color space. Note: when color equality
3609
- # needs to be decided, implementations, unless documented otherwise, will treat
3610
- # two colors to be equal if all their red, green, blue and alpha values each
3611
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
3612
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
3613
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
3614
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
3615
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
3616
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
3617
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
3618
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
3619
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
3620
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
3621
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
3622
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
3623
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
3624
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
3625
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
3626
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
3627
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
3628
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
3629
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
3630
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
3631
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
3632
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
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
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
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 rgbToCssColor_ = function(red, green, blue)
3639
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
3640
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
3641
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
3642
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
3643
- # join(''); `; // ...
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; for example, the fields of this representation can
3651
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
3652
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
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 "rgba()" string in JavaScript, as well. Note: this proto does not carry
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 SHOULD assume the sRGB color space. Note: when color equality
3658
- # needs to be decided, implementations, unless documented otherwise, will treat
3659
- # two colors to be equal if all their red, green, blue and alpha values each
3660
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
3661
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
3662
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
3663
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
3664
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
3665
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
3666
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
3667
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
3668
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
3669
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
3670
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
3671
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
3672
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
3673
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
3674
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
3675
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
3676
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
3677
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
3678
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
3679
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
3680
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
3681
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
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
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
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 rgbToCssColor_ = function(red, green, blue)
3688
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
3689
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
3690
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
3691
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
3692
- # join(''); `; // ...
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; for example, the fields of this representation can
4731
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
4732
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
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 "rgba()" string in JavaScript, as well. Note: this proto does not carry
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 SHOULD assume the sRGB color space. Note: when color equality
4738
- # needs to be decided, implementations, unless documented otherwise, will treat
4739
- # two colors to be equal if all their red, green, blue and alpha values each
4740
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
4741
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
4742
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
4743
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
4744
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
4745
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
4746
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
4747
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
4748
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
4749
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
4750
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
4751
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
4752
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
4753
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
4754
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
4755
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
4756
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
4757
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
4758
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
4759
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
4760
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
4761
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
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
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
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 rgbToCssColor_ = function(red, green, blue)
4768
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
4769
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
4770
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
4771
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
4772
- # join(''); `; // ...
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 to be rendered as a
4783
- # solid color (as if the alpha value had been explicitly given with a value of 1.
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.3.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.1.2"
22
+ GENERATOR_VERSION = "0.2.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210211"
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.3.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-02-15 00:00:00.000000000 Z
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.3.0
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.4'
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.6
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