google-apis-documentai_v1beta3 0.5.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcc2edc12786c0255981b70ff8372cbe52c3b2901d64a94a8c3da6286d2f9641
4
- data.tar.gz: baacf1c3f551b7aacb6f5c88d2bc1358cbff7a62917483bcbd3456a716942a5b
3
+ metadata.gz: 1aa25fad55cc0c214c32a60e65f850828ce9bd516e4d3cf9bc2dafe5503390a5
4
+ data.tar.gz: 18265cd85a0099179545556f326e59eaffbc08b5b11ddcc74f6fa78ab569a81f
5
5
  SHA512:
6
- metadata.gz: 98ce5be1a64367724a992bc58960a0e8e99460f4e7bb70c0630c491a0ce194c43ad52acd26ed4014822b577e9ab6a1461523d05719aad8e81002e433622b47a0
7
- data.tar.gz: c2a696cb4a0bf028a24b057bdbd583a823a2d19988a54f2403c258621f7f24e90d00efeaff37bab5418a9b57f78c6fed14c73484f2c1d0b93c31b2f6be790265
6
+ metadata.gz: bd6d06dbc86fed7b70d864f20e65cefd22de8d9d25d83f39cb46625e98676ed905887523221df94f25f065f1da3b0de89e370eccb696853093fd294980836c7a
7
+ data.tar.gz: 7e79fd04b1269c067cae5abc43947691c49ab1bd9c816a20e95b2933d7c869f15d8ac20d001edaf674449670c0670a0ba87f9645592964cba7e43194f1a63387
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Release history for google-apis-documentai_v1beta3
2
2
 
3
+ ### v0.10.0 (2021-05-12)
4
+
5
+ * Regenerated from discovery document revision 20210507
6
+
7
+ ### v0.9.0 (2021-03-31)
8
+
9
+ * Regenerated from discovery document revision 20210329
10
+
11
+ ### v0.8.0 (2021-03-24)
12
+
13
+ * Regenerated from discovery document revision 20210320
14
+
15
+ ### v0.7.0 (2021-03-16)
16
+
17
+ * Regenerated from discovery document revision 20210312
18
+
19
+ ### v0.6.0 (2021-03-09)
20
+
21
+ * Regenerated from discovery document revision 20210308
22
+ * Regenerated using generator version 0.2.0
23
+
3
24
  ### v0.5.0 (2021-03-04)
4
25
 
5
26
  * Regenerated from discovery document revision 20210226
@@ -31,7 +31,7 @@ module Google
31
31
  # This is NOT the gem version.
32
32
  VERSION = 'V1beta3'
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
@@ -341,12 +341,22 @@ module Google
341
341
  class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation
342
342
  include Google::Apis::Core::Hashable
343
343
 
344
+ # The total number of dataset errors.
345
+ # Corresponds to the JSON property `datasetErrorCount`
346
+ # @return [Fixnum]
347
+ attr_accessor :dataset_error_count
348
+
344
349
  # Error information for the dataset as a whole. A maximum of 10 dataset errors
345
350
  # will be returned. A single dataset error is terminal for training.
346
351
  # Corresponds to the JSON property `datasetErrors`
347
352
  # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleRpcStatus>]
348
353
  attr_accessor :dataset_errors
349
354
 
355
+ # The total number of document errors.
356
+ # Corresponds to the JSON property `documentErrorCount`
357
+ # @return [Fixnum]
358
+ attr_accessor :document_error_count
359
+
350
360
  # Error information pertaining to specific documents. A maximum of 10 document
351
361
  # errors will be returned. Any document with errors will not be used throughout
352
362
  # training.
@@ -360,7 +370,9 @@ module Google
360
370
 
361
371
  # Update properties of this object
362
372
  def update!(**args)
373
+ @dataset_error_count = args[:dataset_error_count] if args.key?(:dataset_error_count)
363
374
  @dataset_errors = args[:dataset_errors] if args.key?(:dataset_errors)
375
+ @document_error_count = args[:document_error_count] if args.key?(:document_error_count)
364
376
  @document_errors = args[:document_errors] if args.key?(:document_errors)
365
377
  end
366
378
  end
@@ -719,9 +731,9 @@ module Google
719
731
  class GoogleCloudDocumentaiV1beta1Document
720
732
  include Google::Apis::Core::Hashable
721
733
 
722
- # Inline document content, represented as a stream of bytes. Note: As with all `
723
- # bytes` fields, protobuffers use a pure binary representation, whereas JSON
724
- # representations use base64.
734
+ # Optional. Inline document content, represented as a stream of bytes. Note: As
735
+ # with all `bytes` fields, protobuffers use a pure binary representation,
736
+ # whereas JSON representations use base64.
725
737
  # Corresponds to the JSON property `content`
726
738
  # NOTE: Values are automatically base64 encoded/decoded in the client library.
727
739
  # @return [String]
@@ -771,7 +783,7 @@ module Google
771
783
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentShardInfo]
772
784
  attr_accessor :shard_info
773
785
 
774
- # UTF-8 encoded text in reading order from the document.
786
+ # Optional. UTF-8 encoded text in reading order from the document.
775
787
  # Corresponds to the JSON property `text`
776
788
  # @return [String]
777
789
  attr_accessor :text
@@ -788,16 +800,10 @@ module Google
788
800
  # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentStyle>]
789
801
  attr_accessor :text_styles
790
802
 
791
- # A list of translations on Document.text. For document shards, translations in
792
- # this list may cross shard boundaries.
793
- # Corresponds to the JSON property `translations`
794
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTranslation>]
795
- attr_accessor :translations
796
-
797
- # Currently supports Google Cloud Storage URI of the form `gs://bucket_name/
798
- # object_name`. Object versioning is not supported. See [Google Cloud Storage
799
- # Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more
800
- # info.
803
+ # Optional. Currently supports Google Cloud Storage URI of the form `gs://
804
+ # bucket_name/object_name`. Object versioning is not supported. See [Google
805
+ # Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-
806
+ # uris) for more info.
801
807
  # Corresponds to the JSON property `uri`
802
808
  # @return [String]
803
809
  attr_accessor :uri
@@ -819,7 +825,6 @@ module Google
819
825
  @text = args[:text] if args.key?(:text)
820
826
  @text_changes = args[:text_changes] if args.key?(:text_changes)
821
827
  @text_styles = args[:text_styles] if args.key?(:text_styles)
822
- @translations = args[:translations] if args.key?(:translations)
823
828
  @uri = args[:uri] if args.key?(:uri)
824
829
  end
825
830
  end
@@ -840,12 +845,12 @@ module Google
840
845
  # @return [String]
841
846
  attr_accessor :id
842
847
 
843
- # Deprecated. Use `id` field instead.
848
+ # Optional. Deprecated. Use `id` field instead.
844
849
  # Corresponds to the JSON property `mentionId`
845
850
  # @return [String]
846
851
  attr_accessor :mention_id
847
852
 
848
- # Text value in the document e.g. `1600 Amphitheatre Pkwy`.
853
+ # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
849
854
  # Corresponds to the JSON property `mentionText`
850
855
  # @return [String]
851
856
  attr_accessor :mention_text
@@ -1153,6 +1158,11 @@ module Google
1153
1158
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1BoundingPoly]
1154
1159
  attr_accessor :bounding_poly
1155
1160
 
1161
+ # Optional. Confidence of detected page element, if applicable. Range [0, 1].
1162
+ # Corresponds to the JSON property `confidence`
1163
+ # @return [Float]
1164
+ attr_accessor :confidence
1165
+
1156
1166
  # Optional. Deprecated. Use PageRef.bounding_poly instead.
1157
1167
  # Corresponds to the JSON property `layoutId`
1158
1168
  # @return [String]
@@ -1176,6 +1186,7 @@ module Google
1176
1186
  # Update properties of this object
1177
1187
  def update!(**args)
1178
1188
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
1189
+ @confidence = args[:confidence] if args.key?(:confidence)
1179
1190
  @layout_id = args[:layout_id] if args.key?(:layout_id)
1180
1191
  @layout_type = args[:layout_type] if args.key?(:layout_type)
1181
1192
  @page = args[:page] if args.key?(:page)
@@ -1730,6 +1741,12 @@ module Google
1730
1741
  # @return [Fixnum]
1731
1742
  attr_accessor :id
1732
1743
 
1744
+ # The index of the parent revisions corresponding collection of items (eg. list
1745
+ # of entities, properties within entities, etc.)
1746
+ # Corresponds to the JSON property `index`
1747
+ # @return [Fixnum]
1748
+ attr_accessor :index
1749
+
1733
1750
  # The index of the [Document.revisions] identifying the parent revision.
1734
1751
  # Corresponds to the JSON property `revision`
1735
1752
  # @return [Fixnum]
@@ -1742,6 +1759,7 @@ module Google
1742
1759
  # Update properties of this object
1743
1760
  def update!(**args)
1744
1761
  @id = args[:id] if args.key?(:id)
1762
+ @index = args[:index] if args.key?(:index)
1745
1763
  @revision = args[:revision] if args.key?(:revision)
1746
1764
  end
1747
1765
  end
@@ -1864,98 +1882,98 @@ module Google
1864
1882
 
1865
1883
  # Represents a color in the RGBA color space. This representation is designed
1866
1884
  # for simplicity of conversion to/from color representations in various
1867
- # languages over compactness; for example, the fields of this representation can
1868
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
1869
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1885
+ # languages over compactness. For example, the fields of this representation can
1886
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
1887
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
1870
1888
  # method in iOS; and, with just a little work, it can be easily formatted into a
1871
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
1889
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
1872
1890
  # information about the absolute color space that should be used to interpret
1873
1891
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
1874
- # applications SHOULD assume the sRGB color space. Note: when color equality
1875
- # needs to be decided, implementations, unless documented otherwise, will treat
1876
- # two colors to be equal if all their red, green, blue and alpha values each
1877
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
1878
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
1879
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
1880
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
1881
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
1882
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
1883
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
1884
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
1885
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
1886
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
1887
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
1888
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
1889
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
1890
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
1891
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
1892
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
1893
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
1894
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
1895
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
1896
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
1897
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
1898
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1892
+ # applications should assume the sRGB color space. When color equality needs to
1893
+ # be decided, implementations, unless documented otherwise, treat two colors as
1894
+ # equal if all their red, green, blue, and alpha values each differ by at most
1895
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
1896
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
1897
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
1898
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
1899
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
1900
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
1901
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
1902
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
1903
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
1904
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
1905
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
1906
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
1907
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
1908
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
1909
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
1910
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
1911
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
1912
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
1913
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
1914
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
1915
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
1916
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1899
1917
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
1900
1918
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
1901
1919
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
1902
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1920
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1903
1921
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
1904
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
1905
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
1906
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
1907
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
1908
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
1909
- # join(''); `; // ...
1922
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
1923
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
1924
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
1925
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
1926
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
1927
+ # / ...
1910
1928
  # Corresponds to the JSON property `backgroundColor`
1911
1929
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
1912
1930
  attr_accessor :background_color
1913
1931
 
1914
1932
  # Represents a color in the RGBA color space. This representation is designed
1915
1933
  # for simplicity of conversion to/from color representations in various
1916
- # languages over compactness; for example, the fields of this representation can
1917
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
1918
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1934
+ # languages over compactness. For example, the fields of this representation can
1935
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
1936
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
1919
1937
  # method in iOS; and, with just a little work, it can be easily formatted into a
1920
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
1938
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
1921
1939
  # information about the absolute color space that should be used to interpret
1922
1940
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
1923
- # applications SHOULD assume the sRGB color space. Note: when color equality
1924
- # needs to be decided, implementations, unless documented otherwise, will treat
1925
- # two colors to be equal if all their red, green, blue and alpha values each
1926
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
1927
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
1928
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
1929
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
1930
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
1931
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
1932
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
1933
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
1934
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
1935
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
1936
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
1937
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
1938
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
1939
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
1940
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
1941
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
1942
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
1943
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
1944
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
1945
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
1946
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
1947
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1941
+ # applications should assume the sRGB color space. When color equality needs to
1942
+ # be decided, implementations, unless documented otherwise, treat two colors as
1943
+ # equal if all their red, green, blue, and alpha values each differ by at most
1944
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
1945
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
1946
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
1947
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
1948
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
1949
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
1950
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
1951
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
1952
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
1953
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
1954
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
1955
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
1956
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
1957
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
1958
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
1959
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
1960
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
1961
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
1962
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
1963
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
1964
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
1965
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1948
1966
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
1949
1967
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
1950
1968
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
1951
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1969
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1952
1970
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
1953
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
1954
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
1955
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
1956
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
1957
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
1958
- # join(''); `; // ...
1971
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
1972
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
1973
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
1974
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
1975
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
1976
+ # / ...
1959
1977
  # Corresponds to the JSON property `color`
1960
1978
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
1961
1979
  attr_accessor :color
@@ -2113,44 +2131,6 @@ module Google
2113
2131
  end
2114
2132
  end
2115
2133
 
2116
- # A translation of the text segment.
2117
- class GoogleCloudDocumentaiV1beta1DocumentTranslation
2118
- include Google::Apis::Core::Hashable
2119
-
2120
- # The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
2121
- # see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
2122
- # Corresponds to the JSON property `languageCode`
2123
- # @return [String]
2124
- attr_accessor :language_code
2125
-
2126
- # The history of this annotation.
2127
- # Corresponds to the JSON property `provenance`
2128
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance>]
2129
- attr_accessor :provenance
2130
-
2131
- # Text reference indexing into the Document.text.
2132
- # Corresponds to the JSON property `textAnchor`
2133
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
2134
- attr_accessor :text_anchor
2135
-
2136
- # Text translated into the target language.
2137
- # Corresponds to the JSON property `translatedText`
2138
- # @return [String]
2139
- attr_accessor :translated_text
2140
-
2141
- def initialize(**args)
2142
- update!(**args)
2143
- end
2144
-
2145
- # Update properties of this object
2146
- def update!(**args)
2147
- @language_code = args[:language_code] if args.key?(:language_code)
2148
- @provenance = args[:provenance] if args.key?(:provenance)
2149
- @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
2150
- @translated_text = args[:translated_text] if args.key?(:translated_text)
2151
- end
2152
- end
2153
-
2154
2134
  # The Google Cloud Storage location where the output file will be written to.
2155
2135
  class GoogleCloudDocumentaiV1beta1GcsDestination
2156
2136
  include Google::Apis::Core::Hashable
@@ -2227,7 +2207,7 @@ module Google
2227
2207
  # @return [Float]
2228
2208
  attr_accessor :x
2229
2209
 
2230
- # Y coordinate.
2210
+ # Y coordinate (starts from the top of the image).
2231
2211
  # Corresponds to the JSON property `y`
2232
2212
  # @return [Float]
2233
2213
  attr_accessor :y
@@ -2348,7 +2328,7 @@ module Google
2348
2328
  # @return [Fixnum]
2349
2329
  attr_accessor :x
2350
2330
 
2351
- # Y coordinate.
2331
+ # Y coordinate (starts from the top of the image).
2352
2332
  # Corresponds to the JSON property `y`
2353
2333
  # @return [Fixnum]
2354
2334
  attr_accessor :y
@@ -2416,9 +2396,9 @@ module Google
2416
2396
  class GoogleCloudDocumentaiV1beta2Document
2417
2397
  include Google::Apis::Core::Hashable
2418
2398
 
2419
- # Inline document content, represented as a stream of bytes. Note: As with all `
2420
- # bytes` fields, protobuffers use a pure binary representation, whereas JSON
2421
- # representations use base64.
2399
+ # Optional. Inline document content, represented as a stream of bytes. Note: As
2400
+ # with all `bytes` fields, protobuffers use a pure binary representation,
2401
+ # whereas JSON representations use base64.
2422
2402
  # Corresponds to the JSON property `content`
2423
2403
  # NOTE: Values are automatically base64 encoded/decoded in the client library.
2424
2404
  # @return [String]
@@ -2473,7 +2453,7 @@ module Google
2473
2453
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentShardInfo]
2474
2454
  attr_accessor :shard_info
2475
2455
 
2476
- # UTF-8 encoded text in reading order from the document.
2456
+ # Optional. UTF-8 encoded text in reading order from the document.
2477
2457
  # Corresponds to the JSON property `text`
2478
2458
  # @return [String]
2479
2459
  attr_accessor :text
@@ -2490,16 +2470,10 @@ module Google
2490
2470
  # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentStyle>]
2491
2471
  attr_accessor :text_styles
2492
2472
 
2493
- # A list of translations on Document.text. For document shards, translations in
2494
- # this list may cross shard boundaries.
2495
- # Corresponds to the JSON property `translations`
2496
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentTranslation>]
2497
- attr_accessor :translations
2498
-
2499
- # Currently supports Google Cloud Storage URI of the form `gs://bucket_name/
2500
- # object_name`. Object versioning is not supported. See [Google Cloud Storage
2501
- # Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more
2502
- # info.
2473
+ # Optional. Currently supports Google Cloud Storage URI of the form `gs://
2474
+ # bucket_name/object_name`. Object versioning is not supported. See [Google
2475
+ # Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-
2476
+ # uris) for more info.
2503
2477
  # Corresponds to the JSON property `uri`
2504
2478
  # @return [String]
2505
2479
  attr_accessor :uri
@@ -2522,7 +2496,6 @@ module Google
2522
2496
  @text = args[:text] if args.key?(:text)
2523
2497
  @text_changes = args[:text_changes] if args.key?(:text_changes)
2524
2498
  @text_styles = args[:text_styles] if args.key?(:text_styles)
2525
- @translations = args[:translations] if args.key?(:translations)
2526
2499
  @uri = args[:uri] if args.key?(:uri)
2527
2500
  end
2528
2501
  end
@@ -2543,12 +2516,12 @@ module Google
2543
2516
  # @return [String]
2544
2517
  attr_accessor :id
2545
2518
 
2546
- # Deprecated. Use `id` field instead.
2519
+ # Optional. Deprecated. Use `id` field instead.
2547
2520
  # Corresponds to the JSON property `mentionId`
2548
2521
  # @return [String]
2549
2522
  attr_accessor :mention_id
2550
2523
 
2551
- # Text value in the document e.g. `1600 Amphitheatre Pkwy`.
2524
+ # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
2552
2525
  # Corresponds to the JSON property `mentionText`
2553
2526
  # @return [String]
2554
2527
  attr_accessor :mention_text
@@ -2893,6 +2866,11 @@ module Google
2893
2866
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2BoundingPoly]
2894
2867
  attr_accessor :bounding_poly
2895
2868
 
2869
+ # Optional. Confidence of detected page element, if applicable. Range [0, 1].
2870
+ # Corresponds to the JSON property `confidence`
2871
+ # @return [Float]
2872
+ attr_accessor :confidence
2873
+
2896
2874
  # Optional. Deprecated. Use PageRef.bounding_poly instead.
2897
2875
  # Corresponds to the JSON property `layoutId`
2898
2876
  # @return [String]
@@ -2916,6 +2894,7 @@ module Google
2916
2894
  # Update properties of this object
2917
2895
  def update!(**args)
2918
2896
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
2897
+ @confidence = args[:confidence] if args.key?(:confidence)
2919
2898
  @layout_id = args[:layout_id] if args.key?(:layout_id)
2920
2899
  @layout_type = args[:layout_type] if args.key?(:layout_type)
2921
2900
  @page = args[:page] if args.key?(:page)
@@ -3470,6 +3449,12 @@ module Google
3470
3449
  # @return [Fixnum]
3471
3450
  attr_accessor :id
3472
3451
 
3452
+ # The index of the parent revisions corresponding collection of items (eg. list
3453
+ # of entities, properties within entities, etc.)
3454
+ # Corresponds to the JSON property `index`
3455
+ # @return [Fixnum]
3456
+ attr_accessor :index
3457
+
3473
3458
  # The index of the [Document.revisions] identifying the parent revision.
3474
3459
  # Corresponds to the JSON property `revision`
3475
3460
  # @return [Fixnum]
@@ -3482,6 +3467,7 @@ module Google
3482
3467
  # Update properties of this object
3483
3468
  def update!(**args)
3484
3469
  @id = args[:id] if args.key?(:id)
3470
+ @index = args[:index] if args.key?(:index)
3485
3471
  @revision = args[:revision] if args.key?(:revision)
3486
3472
  end
3487
3473
  end
@@ -3604,98 +3590,98 @@ module Google
3604
3590
 
3605
3591
  # Represents a color in the RGBA color space. This representation is designed
3606
3592
  # for simplicity of conversion to/from color representations in various
3607
- # languages over compactness; for example, the fields of this representation can
3608
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
3609
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3593
+ # languages over compactness. For example, the fields of this representation can
3594
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
3595
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
3610
3596
  # method in iOS; and, with just a little work, it can be easily formatted into a
3611
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
3597
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
3612
3598
  # information about the absolute color space that should be used to interpret
3613
3599
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
3614
- # applications SHOULD assume the sRGB color space. Note: when color equality
3615
- # needs to be decided, implementations, unless documented otherwise, will treat
3616
- # two colors to be equal if all their red, green, blue and alpha values each
3617
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
3618
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
3619
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
3620
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
3621
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
3622
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
3623
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
3624
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
3625
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
3626
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
3627
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
3628
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
3629
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
3630
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
3631
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
3632
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
3633
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
3634
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
3635
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
3636
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
3637
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
3638
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3600
+ # applications should assume the sRGB color space. When color equality needs to
3601
+ # be decided, implementations, unless documented otherwise, treat two colors as
3602
+ # equal if all their red, green, blue, and alpha values each differ by at most
3603
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
3604
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
3605
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
3606
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
3607
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
3608
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
3609
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
3610
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
3611
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
3612
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
3613
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
3614
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
3615
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
3616
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
3617
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
3618
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
3619
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
3620
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
3621
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
3622
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
3623
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
3624
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3639
3625
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3640
3626
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3641
3627
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3642
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3628
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3643
3629
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3644
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
3645
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
3646
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
3647
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
3648
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
3649
- # join(''); `; // ...
3630
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
3631
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
3632
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
3633
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
3634
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
3635
+ # / ...
3650
3636
  # Corresponds to the JSON property `backgroundColor`
3651
3637
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3652
3638
  attr_accessor :background_color
3653
3639
 
3654
3640
  # Represents a color in the RGBA color space. This representation is designed
3655
3641
  # for simplicity of conversion to/from color representations in various
3656
- # languages over compactness; for example, the fields of this representation can
3657
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
3658
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3642
+ # languages over compactness. For example, the fields of this representation can
3643
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
3644
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
3659
3645
  # method in iOS; and, with just a little work, it can be easily formatted into a
3660
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
3646
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
3661
3647
  # information about the absolute color space that should be used to interpret
3662
3648
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
3663
- # applications SHOULD assume the sRGB color space. Note: when color equality
3664
- # needs to be decided, implementations, unless documented otherwise, will treat
3665
- # two colors to be equal if all their red, green, blue and alpha values each
3666
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
3667
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
3668
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
3669
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
3670
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
3671
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
3672
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
3673
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
3674
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
3675
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
3676
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
3677
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
3678
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
3679
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
3680
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
3681
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
3682
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
3683
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
3684
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
3685
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
3686
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
3687
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3649
+ # applications should assume the sRGB color space. When color equality needs to
3650
+ # be decided, implementations, unless documented otherwise, treat two colors as
3651
+ # equal if all their red, green, blue, and alpha values each differ by at most
3652
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
3653
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
3654
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
3655
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
3656
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
3657
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
3658
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
3659
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
3660
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
3661
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
3662
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
3663
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
3664
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
3665
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
3666
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
3667
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
3668
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
3669
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
3670
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
3671
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
3672
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
3673
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3688
3674
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3689
3675
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3690
3676
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3691
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3677
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3692
3678
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3693
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
3694
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
3695
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
3696
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
3697
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
3698
- # join(''); `; // ...
3679
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
3680
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
3681
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
3682
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
3683
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
3684
+ # / ...
3699
3685
  # Corresponds to the JSON property `color`
3700
3686
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3701
3687
  attr_accessor :color
@@ -3853,44 +3839,6 @@ module Google
3853
3839
  end
3854
3840
  end
3855
3841
 
3856
- # A translation of the text segment.
3857
- class GoogleCloudDocumentaiV1beta2DocumentTranslation
3858
- include Google::Apis::Core::Hashable
3859
-
3860
- # The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
3861
- # see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
3862
- # Corresponds to the JSON property `languageCode`
3863
- # @return [String]
3864
- attr_accessor :language_code
3865
-
3866
- # The history of this annotation.
3867
- # Corresponds to the JSON property `provenance`
3868
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentProvenance>]
3869
- attr_accessor :provenance
3870
-
3871
- # Text reference indexing into the Document.text.
3872
- # Corresponds to the JSON property `textAnchor`
3873
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentTextAnchor]
3874
- attr_accessor :text_anchor
3875
-
3876
- # Text translated into the target language.
3877
- # Corresponds to the JSON property `translatedText`
3878
- # @return [String]
3879
- attr_accessor :translated_text
3880
-
3881
- def initialize(**args)
3882
- update!(**args)
3883
- end
3884
-
3885
- # Update properties of this object
3886
- def update!(**args)
3887
- @language_code = args[:language_code] if args.key?(:language_code)
3888
- @provenance = args[:provenance] if args.key?(:provenance)
3889
- @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
3890
- @translated_text = args[:translated_text] if args.key?(:translated_text)
3891
- end
3892
- end
3893
-
3894
3842
  # The Google Cloud Storage location where the output file will be written to.
3895
3843
  class GoogleCloudDocumentaiV1beta2GcsDestination
3896
3844
  include Google::Apis::Core::Hashable
@@ -3977,7 +3925,7 @@ module Google
3977
3925
  # @return [Float]
3978
3926
  attr_accessor :x
3979
3927
 
3980
- # Y coordinate.
3928
+ # Y coordinate (starts from the top of the image).
3981
3929
  # Corresponds to the JSON property `y`
3982
3930
  # @return [Float]
3983
3931
  attr_accessor :y
@@ -4098,7 +4046,7 @@ module Google
4098
4046
  # @return [Fixnum]
4099
4047
  attr_accessor :x
4100
4048
 
4101
- # Y coordinate.
4049
+ # Y coordinate (starts from the top of the image).
4102
4050
  # Corresponds to the JSON property `y`
4103
4051
  # @return [Fixnum]
4104
4052
  attr_accessor :y
@@ -4405,6 +4353,19 @@ module Google
4405
4353
  end
4406
4354
  end
4407
4355
 
4356
+ # Request message for the disable processor method.
4357
+ class GoogleCloudDocumentaiV1beta3DisableProcessorRequest
4358
+ include Google::Apis::Core::Hashable
4359
+
4360
+ def initialize(**args)
4361
+ update!(**args)
4362
+ end
4363
+
4364
+ # Update properties of this object
4365
+ def update!(**args)
4366
+ end
4367
+ end
4368
+
4408
4369
  # Document represents the canonical document resource in Document Understanding
4409
4370
  # AI. It is an interchange format that provides insights into documents and
4410
4371
  # allows for collaboration between users and Document Understanding AI to
@@ -4412,9 +4373,9 @@ module Google
4412
4373
  class GoogleCloudDocumentaiV1beta3Document
4413
4374
  include Google::Apis::Core::Hashable
4414
4375
 
4415
- # Inline document content, represented as a stream of bytes. Note: As with all `
4416
- # bytes` fields, protobuffers use a pure binary representation, whereas JSON
4417
- # representations use base64.
4376
+ # Optional. Inline document content, represented as a stream of bytes. Note: As
4377
+ # with all `bytes` fields, protobuffers use a pure binary representation,
4378
+ # whereas JSON representations use base64.
4418
4379
  # Corresponds to the JSON property `content`
4419
4380
  # NOTE: Values are automatically base64 encoded/decoded in the client library.
4420
4381
  # @return [String]
@@ -4464,7 +4425,7 @@ module Google
4464
4425
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentShardInfo]
4465
4426
  attr_accessor :shard_info
4466
4427
 
4467
- # UTF-8 encoded text in reading order from the document.
4428
+ # Optional. UTF-8 encoded text in reading order from the document.
4468
4429
  # Corresponds to the JSON property `text`
4469
4430
  # @return [String]
4470
4431
  attr_accessor :text
@@ -4481,16 +4442,10 @@ module Google
4481
4442
  # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentStyle>]
4482
4443
  attr_accessor :text_styles
4483
4444
 
4484
- # A list of translations on Document.text. For document shards, translations in
4485
- # this list may cross shard boundaries.
4486
- # Corresponds to the JSON property `translations`
4487
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentTranslation>]
4488
- attr_accessor :translations
4489
-
4490
- # Currently supports Google Cloud Storage URI of the form `gs://bucket_name/
4491
- # object_name`. Object versioning is not supported. See [Google Cloud Storage
4492
- # Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more
4493
- # info.
4445
+ # Optional. Currently supports Google Cloud Storage URI of the form `gs://
4446
+ # bucket_name/object_name`. Object versioning is not supported. See [Google
4447
+ # Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-
4448
+ # uris) for more info.
4494
4449
  # Corresponds to the JSON property `uri`
4495
4450
  # @return [String]
4496
4451
  attr_accessor :uri
@@ -4512,7 +4467,6 @@ module Google
4512
4467
  @text = args[:text] if args.key?(:text)
4513
4468
  @text_changes = args[:text_changes] if args.key?(:text_changes)
4514
4469
  @text_styles = args[:text_styles] if args.key?(:text_styles)
4515
- @translations = args[:translations] if args.key?(:translations)
4516
4470
  @uri = args[:uri] if args.key?(:uri)
4517
4471
  end
4518
4472
  end
@@ -4533,12 +4487,12 @@ module Google
4533
4487
  # @return [String]
4534
4488
  attr_accessor :id
4535
4489
 
4536
- # Deprecated. Use `id` field instead.
4490
+ # Optional. Deprecated. Use `id` field instead.
4537
4491
  # Corresponds to the JSON property `mentionId`
4538
4492
  # @return [String]
4539
4493
  attr_accessor :mention_id
4540
4494
 
4541
- # Text value in the document e.g. `1600 Amphitheatre Pkwy`.
4495
+ # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
4542
4496
  # Corresponds to the JSON property `mentionText`
4543
4497
  # @return [String]
4544
4498
  attr_accessor :mention_text
@@ -4885,6 +4839,11 @@ module Google
4885
4839
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3BoundingPoly]
4886
4840
  attr_accessor :bounding_poly
4887
4841
 
4842
+ # Optional. Confidence of detected page element, if applicable. Range [0, 1].
4843
+ # Corresponds to the JSON property `confidence`
4844
+ # @return [Float]
4845
+ attr_accessor :confidence
4846
+
4888
4847
  # Optional. Deprecated. Use PageRef.bounding_poly instead.
4889
4848
  # Corresponds to the JSON property `layoutId`
4890
4849
  # @return [String]
@@ -4908,6 +4867,7 @@ module Google
4908
4867
  # Update properties of this object
4909
4868
  def update!(**args)
4910
4869
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
4870
+ @confidence = args[:confidence] if args.key?(:confidence)
4911
4871
  @layout_id = args[:layout_id] if args.key?(:layout_id)
4912
4872
  @layout_type = args[:layout_type] if args.key?(:layout_type)
4913
4873
  @page = args[:page] if args.key?(:page)
@@ -5462,6 +5422,12 @@ module Google
5462
5422
  # @return [Fixnum]
5463
5423
  attr_accessor :id
5464
5424
 
5425
+ # The index of the parent revisions corresponding collection of items (eg. list
5426
+ # of entities, properties within entities, etc.)
5427
+ # Corresponds to the JSON property `index`
5428
+ # @return [Fixnum]
5429
+ attr_accessor :index
5430
+
5465
5431
  # The index of the [Document.revisions] identifying the parent revision.
5466
5432
  # Corresponds to the JSON property `revision`
5467
5433
  # @return [Fixnum]
@@ -5474,6 +5440,7 @@ module Google
5474
5440
  # Update properties of this object
5475
5441
  def update!(**args)
5476
5442
  @id = args[:id] if args.key?(:id)
5443
+ @index = args[:index] if args.key?(:index)
5477
5444
  @revision = args[:revision] if args.key?(:revision)
5478
5445
  end
5479
5446
  end
@@ -5596,98 +5563,98 @@ module Google
5596
5563
 
5597
5564
  # Represents a color in the RGBA color space. This representation is designed
5598
5565
  # for simplicity of conversion to/from color representations in various
5599
- # languages over compactness; for example, the fields of this representation can
5600
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
5601
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5566
+ # languages over compactness. For example, the fields of this representation can
5567
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
5568
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
5602
5569
  # method in iOS; and, with just a little work, it can be easily formatted into a
5603
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
5570
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
5604
5571
  # information about the absolute color space that should be used to interpret
5605
5572
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
5606
- # applications SHOULD assume the sRGB color space. Note: when color equality
5607
- # needs to be decided, implementations, unless documented otherwise, will treat
5608
- # two colors to be equal if all their red, green, blue and alpha values each
5609
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
5610
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
5611
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
5612
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
5613
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
5614
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
5615
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
5616
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
5617
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
5618
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
5619
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
5620
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
5621
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
5622
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
5623
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
5624
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
5625
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
5626
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
5627
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
5628
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
5629
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
5630
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
5573
+ # applications should assume the sRGB color space. When color equality needs to
5574
+ # be decided, implementations, unless documented otherwise, treat two colors as
5575
+ # equal if all their red, green, blue, and alpha values each differ by at most
5576
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
5577
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
5578
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
5579
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
5580
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
5581
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
5582
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
5583
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
5584
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
5585
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
5586
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
5587
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
5588
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
5589
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
5590
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
5591
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
5592
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
5593
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
5594
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
5595
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
5596
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
5597
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
5631
5598
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
5632
5599
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
5633
5600
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
5634
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5601
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5635
5602
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
5636
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
5637
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
5638
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
5639
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
5640
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
5641
- # join(''); `; // ...
5603
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
5604
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
5605
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
5606
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
5607
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
5608
+ # / ...
5642
5609
  # Corresponds to the JSON property `backgroundColor`
5643
5610
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
5644
5611
  attr_accessor :background_color
5645
5612
 
5646
5613
  # Represents a color in the RGBA color space. This representation is designed
5647
5614
  # for simplicity of conversion to/from color representations in various
5648
- # languages over compactness; for example, the fields of this representation can
5649
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
5650
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5615
+ # languages over compactness. For example, the fields of this representation can
5616
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
5617
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
5651
5618
  # method in iOS; and, with just a little work, it can be easily formatted into a
5652
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
5619
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
5653
5620
  # information about the absolute color space that should be used to interpret
5654
5621
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
5655
- # applications SHOULD assume the sRGB color space. Note: when color equality
5656
- # needs to be decided, implementations, unless documented otherwise, will treat
5657
- # two colors to be equal if all their red, green, blue and alpha values each
5658
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
5659
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
5660
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
5661
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
5662
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
5663
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
5664
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
5665
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
5666
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
5667
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
5668
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
5669
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
5670
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
5671
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
5672
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
5673
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
5674
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
5675
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
5676
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
5677
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
5678
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
5679
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
5622
+ # applications should assume the sRGB color space. When color equality needs to
5623
+ # be decided, implementations, unless documented otherwise, treat two colors as
5624
+ # equal if all their red, green, blue, and alpha values each differ by at most
5625
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
5626
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
5627
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
5628
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
5629
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
5630
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
5631
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
5632
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
5633
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
5634
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
5635
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
5636
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
5637
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
5638
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
5639
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
5640
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
5641
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
5642
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
5643
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
5644
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
5645
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
5646
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
5680
5647
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
5681
5648
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
5682
5649
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
5683
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5650
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5684
5651
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
5685
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
5686
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
5687
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
5688
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
5689
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
5690
- # join(''); `; // ...
5652
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
5653
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
5654
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
5655
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
5656
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
5657
+ # / ...
5691
5658
  # Corresponds to the JSON property `color`
5692
5659
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
5693
5660
  attr_accessor :color
@@ -5845,30 +5812,27 @@ module Google
5845
5812
  end
5846
5813
  end
5847
5814
 
5848
- # A translation of the text segment.
5849
- class GoogleCloudDocumentaiV1beta3DocumentTranslation
5815
+ # Request message for the enable processor method.
5816
+ class GoogleCloudDocumentaiV1beta3EnableProcessorRequest
5850
5817
  include Google::Apis::Core::Hashable
5851
5818
 
5852
- # The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
5853
- # see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
5854
- # Corresponds to the JSON property `languageCode`
5855
- # @return [String]
5856
- attr_accessor :language_code
5819
+ def initialize(**args)
5820
+ update!(**args)
5821
+ end
5857
5822
 
5858
- # The history of this annotation.
5859
- # Corresponds to the JSON property `provenance`
5860
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentProvenance>]
5861
- attr_accessor :provenance
5823
+ # Update properties of this object
5824
+ def update!(**args)
5825
+ end
5826
+ end
5862
5827
 
5863
- # Text reference indexing into the Document.text.
5864
- # Corresponds to the JSON property `textAnchor`
5865
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentTextAnchor]
5866
- attr_accessor :text_anchor
5828
+ # Response message for fetch processor types.
5829
+ class GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse
5830
+ include Google::Apis::Core::Hashable
5867
5831
 
5868
- # Text translated into the target language.
5869
- # Corresponds to the JSON property `translatedText`
5870
- # @return [String]
5871
- attr_accessor :translated_text
5832
+ # The list of processor types.
5833
+ # Corresponds to the JSON property `processorTypes`
5834
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorType>]
5835
+ attr_accessor :processor_types
5872
5836
 
5873
5837
  def initialize(**args)
5874
5838
  update!(**args)
@@ -5876,10 +5840,7 @@ module Google
5876
5840
 
5877
5841
  # Update properties of this object
5878
5842
  def update!(**args)
5879
- @language_code = args[:language_code] if args.key?(:language_code)
5880
- @provenance = args[:provenance] if args.key?(:provenance)
5881
- @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
5882
- @translated_text = args[:translated_text] if args.key?(:translated_text)
5843
+ @processor_types = args[:processor_types] if args.key?(:processor_types)
5883
5844
  end
5884
5845
  end
5885
5846
 
@@ -5980,6 +5941,31 @@ module Google
5980
5941
  end
5981
5942
  end
5982
5943
 
5944
+ # Response message for list processors.
5945
+ class GoogleCloudDocumentaiV1beta3ListProcessorsResponse
5946
+ include Google::Apis::Core::Hashable
5947
+
5948
+ # Points to the next processor, otherwise empty.
5949
+ # Corresponds to the JSON property `nextPageToken`
5950
+ # @return [String]
5951
+ attr_accessor :next_page_token
5952
+
5953
+ # The list of processors.
5954
+ # Corresponds to the JSON property `processors`
5955
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor>]
5956
+ attr_accessor :processors
5957
+
5958
+ def initialize(**args)
5959
+ update!(**args)
5960
+ end
5961
+
5962
+ # Update properties of this object
5963
+ def update!(**args)
5964
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
5965
+ @processors = args[:processors] if args.key?(:processors)
5966
+ end
5967
+ end
5968
+
5983
5969
  # A vertex represents a 2D point in the image. NOTE: the normalized vertex
5984
5970
  # coordinates are relative to the original image and range from 0 to 1.
5985
5971
  class GoogleCloudDocumentaiV1beta3NormalizedVertex
@@ -5990,7 +5976,7 @@ module Google
5990
5976
  # @return [Float]
5991
5977
  attr_accessor :x
5992
5978
 
5993
- # Y coordinate.
5979
+ # Y coordinate (starts from the top of the image).
5994
5980
  # Corresponds to the JSON property `y`
5995
5981
  # @return [Float]
5996
5982
  attr_accessor :y
@@ -6088,6 +6074,158 @@ module Google
6088
6074
  end
6089
6075
  end
6090
6076
 
6077
+ # The first-class citizen for DAI. Each processor defines how to extract
6078
+ # structural information from a document.
6079
+ class GoogleCloudDocumentaiV1beta3Processor
6080
+ include Google::Apis::Core::Hashable
6081
+
6082
+ # The time the processor was created.
6083
+ # Corresponds to the JSON property `createTime`
6084
+ # @return [String]
6085
+ attr_accessor :create_time
6086
+
6087
+ # The default processor version.
6088
+ # Corresponds to the JSON property `defaultProcessorVersion`
6089
+ # @return [String]
6090
+ attr_accessor :default_processor_version
6091
+
6092
+ # The display name of the processor.
6093
+ # Corresponds to the JSON property `displayName`
6094
+ # @return [String]
6095
+ attr_accessor :display_name
6096
+
6097
+ # The KMS key used for encryption/decryption in CMEK scenarios. See https://
6098
+ # cloud.google.com/security-key-management.
6099
+ # Corresponds to the JSON property `kmsKeyName`
6100
+ # @return [String]
6101
+ attr_accessor :kms_key_name
6102
+
6103
+ # Output only. Immutable. The resource name of the processor. Format: projects/`
6104
+ # project`/locations/`location`/processors/`processor`
6105
+ # Corresponds to the JSON property `name`
6106
+ # @return [String]
6107
+ attr_accessor :name
6108
+
6109
+ # Output only. Immutable. The http endpoint that can be called to invoke
6110
+ # processing.
6111
+ # Corresponds to the JSON property `processEndpoint`
6112
+ # @return [String]
6113
+ attr_accessor :process_endpoint
6114
+
6115
+ # Output only. The state of the processor.
6116
+ # Corresponds to the JSON property `state`
6117
+ # @return [String]
6118
+ attr_accessor :state
6119
+
6120
+ # The processor type, e.g., INVOICE_PARSING, W2_PARSING, etc.
6121
+ # Corresponds to the JSON property `type`
6122
+ # @return [String]
6123
+ attr_accessor :type
6124
+
6125
+ def initialize(**args)
6126
+ update!(**args)
6127
+ end
6128
+
6129
+ # Update properties of this object
6130
+ def update!(**args)
6131
+ @create_time = args[:create_time] if args.key?(:create_time)
6132
+ @default_processor_version = args[:default_processor_version] if args.key?(:default_processor_version)
6133
+ @display_name = args[:display_name] if args.key?(:display_name)
6134
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
6135
+ @name = args[:name] if args.key?(:name)
6136
+ @process_endpoint = args[:process_endpoint] if args.key?(:process_endpoint)
6137
+ @state = args[:state] if args.key?(:state)
6138
+ @type = args[:type] if args.key?(:type)
6139
+ end
6140
+ end
6141
+
6142
+ # A processor type is responsible for performing a certain document
6143
+ # understanding task on a certain type of document. All processor types are
6144
+ # created by the documentai service internally. User will only list all
6145
+ # available processor types via UI. For different users (projects), the
6146
+ # available processor types may be different since we'll expose the access of
6147
+ # some types via EAP whitelisting. We make the ProcessorType a resource under
6148
+ # location so we have a unified API and keep the possibility that UI will load
6149
+ # different available processor types from different regions. But for alpha the
6150
+ # behavior is that the user will always get the union of all available processor
6151
+ # types among all regions no matter which regionalized endpoint is called, and
6152
+ # then we use the 'available_locations' field to show under which regions a
6153
+ # processor type is available. For example, users can call either the 'US' or '
6154
+ # EU' endpoint to feach processor types. In the return, we will have an 'invoice
6155
+ # parsing' processor with 'available_locations' field only containing 'US'. So
6156
+ # the user can try to create an 'invoice parsing' processor under the location '
6157
+ # US'. Such attempt of creating under the location 'EU' will fail. Next ID: 7.
6158
+ class GoogleCloudDocumentaiV1beta3ProcessorType
6159
+ include Google::Apis::Core::Hashable
6160
+
6161
+ # Whether the processor type allows creation. If yes, user can create a
6162
+ # processor of this processor type. Otherwise, user needs to require for
6163
+ # whitelisting.
6164
+ # Corresponds to the JSON property `allowCreation`
6165
+ # @return [Boolean]
6166
+ attr_accessor :allow_creation
6167
+ alias_method :allow_creation?, :allow_creation
6168
+
6169
+ # The locations in which this processor is available.
6170
+ # Corresponds to the JSON property `availableLocations`
6171
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorTypeLocationInfo>]
6172
+ attr_accessor :available_locations
6173
+
6174
+ # The processor category, used by UI to group processor types.
6175
+ # Corresponds to the JSON property `category`
6176
+ # @return [String]
6177
+ attr_accessor :category
6178
+
6179
+ # The resource name of the processor type. Format: projects/`project`/
6180
+ # processorTypes/`processor_type`
6181
+ # Corresponds to the JSON property `name`
6182
+ # @return [String]
6183
+ attr_accessor :name
6184
+
6185
+ # The schema defines the output of the processed document by a processor.
6186
+ # Corresponds to the JSON property `schema`
6187
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Schema]
6188
+ attr_accessor :schema
6189
+
6190
+ # The type of the processor, e.g, "invoice_parsing".
6191
+ # Corresponds to the JSON property `type`
6192
+ # @return [String]
6193
+ attr_accessor :type
6194
+
6195
+ def initialize(**args)
6196
+ update!(**args)
6197
+ end
6198
+
6199
+ # Update properties of this object
6200
+ def update!(**args)
6201
+ @allow_creation = args[:allow_creation] if args.key?(:allow_creation)
6202
+ @available_locations = args[:available_locations] if args.key?(:available_locations)
6203
+ @category = args[:category] if args.key?(:category)
6204
+ @name = args[:name] if args.key?(:name)
6205
+ @schema = args[:schema] if args.key?(:schema)
6206
+ @type = args[:type] if args.key?(:type)
6207
+ end
6208
+ end
6209
+
6210
+ # The location information about where the processor is available.
6211
+ class GoogleCloudDocumentaiV1beta3ProcessorTypeLocationInfo
6212
+ include Google::Apis::Core::Hashable
6213
+
6214
+ # The location id, currently must be one of [us, eu].
6215
+ # Corresponds to the JSON property `locationId`
6216
+ # @return [String]
6217
+ attr_accessor :location_id
6218
+
6219
+ def initialize(**args)
6220
+ update!(**args)
6221
+ end
6222
+
6223
+ # Update properties of this object
6224
+ def update!(**args)
6225
+ @location_id = args[:location_id] if args.key?(:location_id)
6226
+ end
6227
+ end
6228
+
6091
6229
  # Payload message of raw document content (bytes).
6092
6230
  class GoogleCloudDocumentaiV1beta3RawDocument
6093
6231
  include Google::Apis::Core::Hashable
@@ -6208,6 +6346,106 @@ module Google
6208
6346
  end
6209
6347
  end
6210
6348
 
6349
+ # The schema defines the output of the processed document by a processor.
6350
+ class GoogleCloudDocumentaiV1beta3Schema
6351
+ include Google::Apis::Core::Hashable
6352
+
6353
+ # Description of the schema.
6354
+ # Corresponds to the JSON property `description`
6355
+ # @return [String]
6356
+ attr_accessor :description
6357
+
6358
+ # Display name to show to users.
6359
+ # Corresponds to the JSON property `displayName`
6360
+ # @return [String]
6361
+ attr_accessor :display_name
6362
+
6363
+ # Entity types of the schema.
6364
+ # Corresponds to the JSON property `entityTypes`
6365
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaEntityType>]
6366
+ attr_accessor :entity_types
6367
+
6368
+ def initialize(**args)
6369
+ update!(**args)
6370
+ end
6371
+
6372
+ # Update properties of this object
6373
+ def update!(**args)
6374
+ @description = args[:description] if args.key?(:description)
6375
+ @display_name = args[:display_name] if args.key?(:display_name)
6376
+ @entity_types = args[:entity_types] if args.key?(:entity_types)
6377
+ end
6378
+ end
6379
+
6380
+ # EntityType is the wrapper of a label of the corresponding model with detailed
6381
+ # attributes and limitations for entity-based processors. Multiple types can
6382
+ # also compose a dependency tree to represent nested types.
6383
+ class GoogleCloudDocumentaiV1beta3SchemaEntityType
6384
+ include Google::Apis::Core::Hashable
6385
+
6386
+ # Type of the entity. It must be one of the following: `document` - the entity
6387
+ # represents a classification of a logical document. `object` - if the entity
6388
+ # has properties it is likely an object (or or a document.) `datetime` - the
6389
+ # entity is a date or time value. `money` - the entity represents a money value
6390
+ # amount. `number` - the entity is a number - integer or floating point. `string`
6391
+ # - the entity is a string value. `boolean` - the entity is a boolean value. `
6392
+ # address` - the entity is a location address.
6393
+ # Corresponds to the JSON property `baseType`
6394
+ # @return [String]
6395
+ attr_accessor :base_type
6396
+
6397
+ # Description of the entity type.
6398
+ # Corresponds to the JSON property `description`
6399
+ # @return [String]
6400
+ attr_accessor :description
6401
+
6402
+ # For some entity types there are only a few possible values. They can be
6403
+ # specified here.
6404
+ # Corresponds to the JSON property `enumValues`
6405
+ # @return [Array<String>]
6406
+ attr_accessor :enum_values
6407
+
6408
+ # Occurrence type limits the number of times an entity type appears in the
6409
+ # document.
6410
+ # Corresponds to the JSON property `occurrenceType`
6411
+ # @return [String]
6412
+ attr_accessor :occurrence_type
6413
+
6414
+ # Describing the nested structure of an entity. An EntityType may consist of
6415
+ # several other EntityTypes. For example, in a document there can be an
6416
+ # EntityType 'ID', which consists of EntityType 'name' and 'address', with
6417
+ # corresponding attributes, such as TEXT for both types and ONCE for occurrence
6418
+ # types.
6419
+ # Corresponds to the JSON property `properties`
6420
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaEntityType>]
6421
+ attr_accessor :properties
6422
+
6423
+ # Source of this entity type.
6424
+ # Corresponds to the JSON property `source`
6425
+ # @return [String]
6426
+ attr_accessor :source
6427
+
6428
+ # Name of the type. It must be unique within the set of same level types.
6429
+ # Corresponds to the JSON property `type`
6430
+ # @return [String]
6431
+ attr_accessor :type
6432
+
6433
+ def initialize(**args)
6434
+ update!(**args)
6435
+ end
6436
+
6437
+ # Update properties of this object
6438
+ def update!(**args)
6439
+ @base_type = args[:base_type] if args.key?(:base_type)
6440
+ @description = args[:description] if args.key?(:description)
6441
+ @enum_values = args[:enum_values] if args.key?(:enum_values)
6442
+ @occurrence_type = args[:occurrence_type] if args.key?(:occurrence_type)
6443
+ @properties = args[:properties] if args.key?(:properties)
6444
+ @source = args[:source] if args.key?(:source)
6445
+ @type = args[:type] if args.key?(:type)
6446
+ end
6447
+ end
6448
+
6211
6449
  # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are
6212
6450
  # in the same scale as the original image.
6213
6451
  class GoogleCloudDocumentaiV1beta3Vertex
@@ -6218,7 +6456,7 @@ module Google
6218
6456
  # @return [Fixnum]
6219
6457
  attr_accessor :x
6220
6458
 
6221
- # Y coordinate.
6459
+ # Y coordinate (starts from the top of the image).
6222
6460
  # Corresponds to the JSON property `y`
6223
6461
  # @return [Fixnum]
6224
6462
  attr_accessor :y
@@ -6426,61 +6664,60 @@ module Google
6426
6664
 
6427
6665
  # Represents a color in the RGBA color space. This representation is designed
6428
6666
  # for simplicity of conversion to/from color representations in various
6429
- # languages over compactness; for example, the fields of this representation can
6430
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
6431
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6667
+ # languages over compactness. For example, the fields of this representation can
6668
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
6669
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
6432
6670
  # method in iOS; and, with just a little work, it can be easily formatted into a
6433
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
6671
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
6434
6672
  # information about the absolute color space that should be used to interpret
6435
6673
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
6436
- # applications SHOULD assume the sRGB color space. Note: when color equality
6437
- # needs to be decided, implementations, unless documented otherwise, will treat
6438
- # two colors to be equal if all their red, green, blue and alpha values each
6439
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
6440
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
6441
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
6442
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
6443
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
6444
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
6445
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
6446
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
6447
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
6448
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
6449
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
6450
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
6451
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
6452
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
6453
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
6454
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
6455
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
6456
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
6457
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
6458
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
6459
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
6460
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
6674
+ # applications should assume the sRGB color space. When color equality needs to
6675
+ # be decided, implementations, unless documented otherwise, treat two colors as
6676
+ # equal if all their red, green, blue, and alpha values each differ by at most
6677
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
6678
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
6679
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
6680
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
6681
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
6682
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
6683
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
6684
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
6685
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
6686
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
6687
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
6688
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
6689
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
6690
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
6691
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
6692
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
6693
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
6694
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
6695
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
6696
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
6697
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
6698
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
6461
6699
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
6462
6700
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
6463
6701
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
6464
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
6702
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
6465
6703
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
6466
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
6467
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
6468
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
6469
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
6470
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
6471
- # join(''); `; // ...
6704
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
6705
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
6706
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
6707
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
6708
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
6709
+ # / ...
6472
6710
  class GoogleTypeColor
6473
6711
  include Google::Apis::Core::Hashable
6474
6712
 
6475
6713
  # The fraction of this color that should be applied to the pixel. That is, the
6476
- # final pixel color is defined by the equation: pixel color = alpha * (this
6477
- # color) + (1.0 - alpha) * (background color) This means that a value of 1.0
6714
+ # final pixel color is defined by the equation: `pixel color = alpha * (this
6715
+ # color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
6478
6716
  # corresponds to a solid color, whereas a value of 0.0 corresponds to a
6479
6717
  # completely transparent color. This uses a wrapper message rather than a simple
6480
6718
  # float scalar so that it is possible to distinguish between a default value and
6481
- # the value being unset. If omitted, this color object is to be rendered as a
6482
- # solid color (as if the alpha value had been explicitly given with a value of 1.
6483
- # 0).
6719
+ # the value being unset. If omitted, this color object is rendered as a solid
6720
+ # color (as if the alpha value had been explicitly given a value of 1.0).
6484
6721
  # Corresponds to the JSON property `alpha`
6485
6722
  # @return [Float]
6486
6723
  attr_accessor :alpha