google-apis-documentai_v1beta3 0.6.0 → 0.11.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: 5991972d74d9567b87ac2a60a2b51eba46c2e3944fb3c1854cde9c745b77c1e4
4
- data.tar.gz: 2a00766961cdf9998d7bcdb79eae5f376422f0a5207abcbb02b04129fe8b62ca
3
+ metadata.gz: 00dabef35c8b6bab6f9e6c4cfd92cb42d4711b5a16e14a0c12d2e7042ef0c09e
4
+ data.tar.gz: ca43115f88b15169b4d52c73abd3da1c092d46a7a5382ee693d144c8d55560a8
5
5
  SHA512:
6
- metadata.gz: 4022e2a723fc9659dd61c48414d92633a2184af7ffdaef561d9f6821fd4eb709b6997f6fadc5a8b7b18af86a0f42572d63c0f64fc4cd06153b4488b31cd1db92
7
- data.tar.gz: 1707b1a4947e1f9c50611bc1bae3168050df8ab7ccfb96d183f1e1690dc17dd4f0bd35fc58b25d8d5e31b9ca21532a83b41481469e77c3b5785f127b1dee656a
6
+ metadata.gz: af6e98ad655df0a3f326675c80e7c9cae5e73c49d38c4b409c2831bb2d625334fe7a32df3aaf34d14104af64084fa60bb0a77710d2773736e83b5ffe8769456a
7
+ data.tar.gz: 991cf2ab7eb8841089d9fac5ebcd0e273fc05895d72f42d1ed328e5ba4fdcf0ca669ef0f931de2715b3b79417c7effe003de90e7eb3c1ac53d58a08dee11cace
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Release history for google-apis-documentai_v1beta3
2
2
 
3
+ ### v0.11.0 (2021-05-19)
4
+
5
+ * Unspecified changes
6
+
7
+ ### v0.10.0 (2021-05-12)
8
+
9
+ * Regenerated from discovery document revision 20210507
10
+
11
+ ### v0.9.0 (2021-03-31)
12
+
13
+ * Regenerated from discovery document revision 20210329
14
+
15
+ ### v0.8.0 (2021-03-24)
16
+
17
+ * Regenerated from discovery document revision 20210320
18
+
19
+ ### v0.7.0 (2021-03-16)
20
+
21
+ * Regenerated from discovery document revision 20210312
22
+
3
23
  ### v0.6.0 (2021-03-09)
4
24
 
5
25
  * Regenerated from discovery document revision 20210308
@@ -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
@@ -271,25 +271,6 @@ module Google
271
271
  end
272
272
  end
273
273
 
274
- # The long running operation metadata for SampleDataset.
275
- class GoogleCloudDocumentaiUiv1beta3SampleDatasetMetadata
276
- include Google::Apis::Core::Hashable
277
-
278
- # The common metadata for long running operations.
279
- # Corresponds to the JSON property `commonMetadata`
280
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata]
281
- attr_accessor :common_metadata
282
-
283
- def initialize(**args)
284
- update!(**args)
285
- end
286
-
287
- # Update properties of this object
288
- def update!(**args)
289
- @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
290
- end
291
- end
292
-
293
274
  # The long running operation metadata for set default processor version method.
294
275
  class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata
295
276
  include Google::Apis::Core::Hashable
@@ -360,12 +341,22 @@ module Google
360
341
  class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation
361
342
  include Google::Apis::Core::Hashable
362
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
+
363
349
  # Error information for the dataset as a whole. A maximum of 10 dataset errors
364
350
  # will be returned. A single dataset error is terminal for training.
365
351
  # Corresponds to the JSON property `datasetErrors`
366
352
  # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleRpcStatus>]
367
353
  attr_accessor :dataset_errors
368
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
+
369
360
  # Error information pertaining to specific documents. A maximum of 10 document
370
361
  # errors will be returned. Any document with errors will not be used throughout
371
362
  # training.
@@ -379,7 +370,9 @@ module Google
379
370
 
380
371
  # Update properties of this object
381
372
  def update!(**args)
373
+ @dataset_error_count = args[:dataset_error_count] if args.key?(:dataset_error_count)
382
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)
383
376
  @document_errors = args[:document_errors] if args.key?(:document_errors)
384
377
  end
385
378
  end
@@ -1165,6 +1158,11 @@ module Google
1165
1158
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1BoundingPoly]
1166
1159
  attr_accessor :bounding_poly
1167
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
+
1168
1166
  # Optional. Deprecated. Use PageRef.bounding_poly instead.
1169
1167
  # Corresponds to the JSON property `layoutId`
1170
1168
  # @return [String]
@@ -1188,6 +1186,7 @@ module Google
1188
1186
  # Update properties of this object
1189
1187
  def update!(**args)
1190
1188
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
1189
+ @confidence = args[:confidence] if args.key?(:confidence)
1191
1190
  @layout_id = args[:layout_id] if args.key?(:layout_id)
1192
1191
  @layout_type = args[:layout_type] if args.key?(:layout_type)
1193
1192
  @page = args[:page] if args.key?(:page)
@@ -1742,6 +1741,12 @@ module Google
1742
1741
  # @return [Fixnum]
1743
1742
  attr_accessor :id
1744
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
+
1745
1750
  # The index of the [Document.revisions] identifying the parent revision.
1746
1751
  # Corresponds to the JSON property `revision`
1747
1752
  # @return [Fixnum]
@@ -1754,6 +1759,7 @@ module Google
1754
1759
  # Update properties of this object
1755
1760
  def update!(**args)
1756
1761
  @id = args[:id] if args.key?(:id)
1762
+ @index = args[:index] if args.key?(:index)
1757
1763
  @revision = args[:revision] if args.key?(:revision)
1758
1764
  end
1759
1765
  end
@@ -1876,98 +1882,98 @@ module Google
1876
1882
 
1877
1883
  # Represents a color in the RGBA color space. This representation is designed
1878
1884
  # for simplicity of conversion to/from color representations in various
1879
- # languages over compactness; for example, the fields of this representation can
1880
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
1881
- # 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`
1882
1888
  # method in iOS; and, with just a little work, it can be easily formatted into a
1883
- # 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
1884
1890
  # information about the absolute color space that should be used to interpret
1885
1891
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
1886
- # applications SHOULD assume the sRGB color space. Note: when color equality
1887
- # needs to be decided, implementations, unless documented otherwise, will treat
1888
- # two colors to be equal if all their red, green, blue and alpha values each
1889
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
1890
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
1891
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
1892
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
1893
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
1894
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
1895
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
1896
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
1897
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
1898
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
1899
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
1900
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
1901
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
1902
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
1903
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
1904
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
1905
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
1906
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
1907
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
1908
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
1909
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
1910
- # 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;
1911
1917
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
1912
1918
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
1913
1919
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
1914
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1920
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1915
1921
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
1916
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
1917
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
1918
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
1919
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
1920
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
1921
- # 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
+ # / ...
1922
1928
  # Corresponds to the JSON property `backgroundColor`
1923
1929
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
1924
1930
  attr_accessor :background_color
1925
1931
 
1926
1932
  # Represents a color in the RGBA color space. This representation is designed
1927
1933
  # for simplicity of conversion to/from color representations in various
1928
- # languages over compactness; for example, the fields of this representation can
1929
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
1930
- # 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`
1931
1937
  # method in iOS; and, with just a little work, it can be easily formatted into a
1932
- # 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
1933
1939
  # information about the absolute color space that should be used to interpret
1934
1940
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
1935
- # applications SHOULD assume the sRGB color space. Note: when color equality
1936
- # needs to be decided, implementations, unless documented otherwise, will treat
1937
- # two colors to be equal if all their red, green, blue and alpha values each
1938
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
1939
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
1940
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
1941
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
1942
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
1943
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
1944
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
1945
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
1946
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
1947
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
1948
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
1949
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
1950
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
1951
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
1952
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
1953
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
1954
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
1955
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
1956
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
1957
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
1958
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
1959
- # 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;
1960
1966
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
1961
1967
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
1962
1968
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
1963
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1969
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1964
1970
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
1965
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
1966
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
1967
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
1968
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
1969
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
1970
- # 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
+ # / ...
1971
1977
  # Corresponds to the JSON property `color`
1972
1978
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
1973
1979
  attr_accessor :color
@@ -2201,7 +2207,7 @@ module Google
2201
2207
  # @return [Float]
2202
2208
  attr_accessor :x
2203
2209
 
2204
- # Y coordinate.
2210
+ # Y coordinate (starts from the top of the image).
2205
2211
  # Corresponds to the JSON property `y`
2206
2212
  # @return [Float]
2207
2213
  attr_accessor :y
@@ -2322,7 +2328,7 @@ module Google
2322
2328
  # @return [Fixnum]
2323
2329
  attr_accessor :x
2324
2330
 
2325
- # Y coordinate.
2331
+ # Y coordinate (starts from the top of the image).
2326
2332
  # Corresponds to the JSON property `y`
2327
2333
  # @return [Fixnum]
2328
2334
  attr_accessor :y
@@ -2860,6 +2866,11 @@ module Google
2860
2866
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2BoundingPoly]
2861
2867
  attr_accessor :bounding_poly
2862
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
+
2863
2874
  # Optional. Deprecated. Use PageRef.bounding_poly instead.
2864
2875
  # Corresponds to the JSON property `layoutId`
2865
2876
  # @return [String]
@@ -2883,6 +2894,7 @@ module Google
2883
2894
  # Update properties of this object
2884
2895
  def update!(**args)
2885
2896
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
2897
+ @confidence = args[:confidence] if args.key?(:confidence)
2886
2898
  @layout_id = args[:layout_id] if args.key?(:layout_id)
2887
2899
  @layout_type = args[:layout_type] if args.key?(:layout_type)
2888
2900
  @page = args[:page] if args.key?(:page)
@@ -3437,6 +3449,12 @@ module Google
3437
3449
  # @return [Fixnum]
3438
3450
  attr_accessor :id
3439
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
+
3440
3458
  # The index of the [Document.revisions] identifying the parent revision.
3441
3459
  # Corresponds to the JSON property `revision`
3442
3460
  # @return [Fixnum]
@@ -3449,6 +3467,7 @@ module Google
3449
3467
  # Update properties of this object
3450
3468
  def update!(**args)
3451
3469
  @id = args[:id] if args.key?(:id)
3470
+ @index = args[:index] if args.key?(:index)
3452
3471
  @revision = args[:revision] if args.key?(:revision)
3453
3472
  end
3454
3473
  end
@@ -3571,98 +3590,98 @@ module Google
3571
3590
 
3572
3591
  # Represents a color in the RGBA color space. This representation is designed
3573
3592
  # for simplicity of conversion to/from color representations in various
3574
- # languages over compactness; for example, the fields of this representation can
3575
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
3576
- # 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`
3577
3596
  # method in iOS; and, with just a little work, it can be easily formatted into a
3578
- # 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
3579
3598
  # information about the absolute color space that should be used to interpret
3580
3599
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
3581
- # applications SHOULD assume the sRGB color space. Note: when color equality
3582
- # needs to be decided, implementations, unless documented otherwise, will treat
3583
- # two colors to be equal if all their red, green, blue and alpha values each
3584
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
3585
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
3586
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
3587
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
3588
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
3589
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
3590
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
3591
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
3592
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
3593
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
3594
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
3595
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
3596
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
3597
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
3598
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
3599
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
3600
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
3601
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
3602
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
3603
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
3604
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
3605
- # 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;
3606
3625
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3607
3626
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3608
3627
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3609
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3628
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3610
3629
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3611
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
3612
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
3613
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
3614
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
3615
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
3616
- # 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
+ # / ...
3617
3636
  # Corresponds to the JSON property `backgroundColor`
3618
3637
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3619
3638
  attr_accessor :background_color
3620
3639
 
3621
3640
  # Represents a color in the RGBA color space. This representation is designed
3622
3641
  # for simplicity of conversion to/from color representations in various
3623
- # languages over compactness; for example, the fields of this representation can
3624
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
3625
- # 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`
3626
3645
  # method in iOS; and, with just a little work, it can be easily formatted into a
3627
- # 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
3628
3647
  # information about the absolute color space that should be used to interpret
3629
3648
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
3630
- # applications SHOULD assume the sRGB color space. Note: when color equality
3631
- # needs to be decided, implementations, unless documented otherwise, will treat
3632
- # two colors to be equal if all their red, green, blue and alpha values each
3633
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
3634
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
3635
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
3636
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
3637
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
3638
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
3639
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
3640
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
3641
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
3642
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
3643
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
3644
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
3645
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
3646
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
3647
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
3648
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
3649
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
3650
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
3651
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
3652
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
3653
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
3654
- # 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;
3655
3674
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3656
3675
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3657
3676
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3658
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3677
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3659
3678
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3660
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
3661
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
3662
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
3663
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
3664
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
3665
- # 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
+ # / ...
3666
3685
  # Corresponds to the JSON property `color`
3667
3686
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3668
3687
  attr_accessor :color
@@ -3906,7 +3925,7 @@ module Google
3906
3925
  # @return [Float]
3907
3926
  attr_accessor :x
3908
3927
 
3909
- # Y coordinate.
3928
+ # Y coordinate (starts from the top of the image).
3910
3929
  # Corresponds to the JSON property `y`
3911
3930
  # @return [Float]
3912
3931
  attr_accessor :y
@@ -4027,7 +4046,7 @@ module Google
4027
4046
  # @return [Fixnum]
4028
4047
  attr_accessor :x
4029
4048
 
4030
- # Y coordinate.
4049
+ # Y coordinate (starts from the top of the image).
4031
4050
  # Corresponds to the JSON property `y`
4032
4051
  # @return [Fixnum]
4033
4052
  attr_accessor :y
@@ -4334,6 +4353,19 @@ module Google
4334
4353
  end
4335
4354
  end
4336
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
+
4337
4369
  # Document represents the canonical document resource in Document Understanding
4338
4370
  # AI. It is an interchange format that provides insights into documents and
4339
4371
  # allows for collaboration between users and Document Understanding AI to
@@ -4807,6 +4839,11 @@ module Google
4807
4839
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3BoundingPoly]
4808
4840
  attr_accessor :bounding_poly
4809
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
+
4810
4847
  # Optional. Deprecated. Use PageRef.bounding_poly instead.
4811
4848
  # Corresponds to the JSON property `layoutId`
4812
4849
  # @return [String]
@@ -4830,6 +4867,7 @@ module Google
4830
4867
  # Update properties of this object
4831
4868
  def update!(**args)
4832
4869
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
4870
+ @confidence = args[:confidence] if args.key?(:confidence)
4833
4871
  @layout_id = args[:layout_id] if args.key?(:layout_id)
4834
4872
  @layout_type = args[:layout_type] if args.key?(:layout_type)
4835
4873
  @page = args[:page] if args.key?(:page)
@@ -5384,6 +5422,12 @@ module Google
5384
5422
  # @return [Fixnum]
5385
5423
  attr_accessor :id
5386
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
+
5387
5431
  # The index of the [Document.revisions] identifying the parent revision.
5388
5432
  # Corresponds to the JSON property `revision`
5389
5433
  # @return [Fixnum]
@@ -5396,6 +5440,7 @@ module Google
5396
5440
  # Update properties of this object
5397
5441
  def update!(**args)
5398
5442
  @id = args[:id] if args.key?(:id)
5443
+ @index = args[:index] if args.key?(:index)
5399
5444
  @revision = args[:revision] if args.key?(:revision)
5400
5445
  end
5401
5446
  end
@@ -5518,98 +5563,98 @@ module Google
5518
5563
 
5519
5564
  # Represents a color in the RGBA color space. This representation is designed
5520
5565
  # for simplicity of conversion to/from color representations in various
5521
- # languages over compactness; for example, the fields of this representation can
5522
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
5523
- # 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`
5524
5569
  # method in iOS; and, with just a little work, it can be easily formatted into a
5525
- # 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
5526
5571
  # information about the absolute color space that should be used to interpret
5527
5572
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
5528
- # applications SHOULD assume the sRGB color space. Note: when color equality
5529
- # needs to be decided, implementations, unless documented otherwise, will treat
5530
- # two colors to be equal if all their red, green, blue and alpha values each
5531
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
5532
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
5533
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
5534
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
5535
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
5536
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
5537
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
5538
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
5539
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
5540
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
5541
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
5542
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
5543
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
5544
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
5545
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
5546
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
5547
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
5548
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
5549
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
5550
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
5551
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
5552
- # 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;
5553
5598
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
5554
5599
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
5555
5600
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
5556
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5601
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5557
5602
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
5558
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
5559
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
5560
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
5561
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
5562
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
5563
- # 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
+ # / ...
5564
5609
  # Corresponds to the JSON property `backgroundColor`
5565
5610
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
5566
5611
  attr_accessor :background_color
5567
5612
 
5568
5613
  # Represents a color in the RGBA color space. This representation is designed
5569
5614
  # for simplicity of conversion to/from color representations in various
5570
- # languages over compactness; for example, the fields of this representation can
5571
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
5572
- # 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`
5573
5618
  # method in iOS; and, with just a little work, it can be easily formatted into a
5574
- # 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
5575
5620
  # information about the absolute color space that should be used to interpret
5576
5621
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
5577
- # applications SHOULD assume the sRGB color space. Note: when color equality
5578
- # needs to be decided, implementations, unless documented otherwise, will treat
5579
- # two colors to be equal if all their red, green, blue and alpha values each
5580
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
5581
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
5582
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
5583
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
5584
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
5585
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
5586
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
5587
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
5588
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
5589
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
5590
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
5591
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
5592
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
5593
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
5594
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
5595
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
5596
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
5597
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
5598
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
5599
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
5600
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
5601
- # 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;
5602
5647
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
5603
5648
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
5604
5649
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
5605
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5650
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5606
5651
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
5607
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
5608
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
5609
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
5610
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
5611
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
5612
- # 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
+ # / ...
5613
5658
  # Corresponds to the JSON property `color`
5614
5659
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
5615
5660
  attr_accessor :color
@@ -5767,6 +5812,38 @@ module Google
5767
5812
  end
5768
5813
  end
5769
5814
 
5815
+ # Request message for the enable processor method.
5816
+ class GoogleCloudDocumentaiV1beta3EnableProcessorRequest
5817
+ include Google::Apis::Core::Hashable
5818
+
5819
+ def initialize(**args)
5820
+ update!(**args)
5821
+ end
5822
+
5823
+ # Update properties of this object
5824
+ def update!(**args)
5825
+ end
5826
+ end
5827
+
5828
+ # Response message for fetch processor types.
5829
+ class GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse
5830
+ include Google::Apis::Core::Hashable
5831
+
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
5836
+
5837
+ def initialize(**args)
5838
+ update!(**args)
5839
+ end
5840
+
5841
+ # Update properties of this object
5842
+ def update!(**args)
5843
+ @processor_types = args[:processor_types] if args.key?(:processor_types)
5844
+ end
5845
+ end
5846
+
5770
5847
  # Specifies a document stored on Cloud Storage.
5771
5848
  class GoogleCloudDocumentaiV1beta3GcsDocument
5772
5849
  include Google::Apis::Core::Hashable
@@ -5864,6 +5941,31 @@ module Google
5864
5941
  end
5865
5942
  end
5866
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
+
5867
5969
  # A vertex represents a 2D point in the image. NOTE: the normalized vertex
5868
5970
  # coordinates are relative to the original image and range from 0 to 1.
5869
5971
  class GoogleCloudDocumentaiV1beta3NormalizedVertex
@@ -5874,7 +5976,7 @@ module Google
5874
5976
  # @return [Float]
5875
5977
  attr_accessor :x
5876
5978
 
5877
- # Y coordinate.
5979
+ # Y coordinate (starts from the top of the image).
5878
5980
  # Corresponds to the JSON property `y`
5879
5981
  # @return [Float]
5880
5982
  attr_accessor :y
@@ -5972,6 +6074,158 @@ module Google
5972
6074
  end
5973
6075
  end
5974
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
+
5975
6229
  # Payload message of raw document content (bytes).
5976
6230
  class GoogleCloudDocumentaiV1beta3RawDocument
5977
6231
  include Google::Apis::Core::Hashable
@@ -6092,6 +6346,106 @@ module Google
6092
6346
  end
6093
6347
  end
6094
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
+
6095
6449
  # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are
6096
6450
  # in the same scale as the original image.
6097
6451
  class GoogleCloudDocumentaiV1beta3Vertex
@@ -6102,7 +6456,7 @@ module Google
6102
6456
  # @return [Fixnum]
6103
6457
  attr_accessor :x
6104
6458
 
6105
- # Y coordinate.
6459
+ # Y coordinate (starts from the top of the image).
6106
6460
  # Corresponds to the JSON property `y`
6107
6461
  # @return [Fixnum]
6108
6462
  attr_accessor :y
@@ -6310,61 +6664,60 @@ module Google
6310
6664
 
6311
6665
  # Represents a color in the RGBA color space. This representation is designed
6312
6666
  # for simplicity of conversion to/from color representations in various
6313
- # languages over compactness; for example, the fields of this representation can
6314
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
6315
- # 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`
6316
6670
  # method in iOS; and, with just a little work, it can be easily formatted into a
6317
- # 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
6318
6672
  # information about the absolute color space that should be used to interpret
6319
6673
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
6320
- # applications SHOULD assume the sRGB color space. Note: when color equality
6321
- # needs to be decided, implementations, unless documented otherwise, will treat
6322
- # two colors to be equal if all their red, green, blue and alpha values each
6323
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
6324
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
6325
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
6326
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
6327
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
6328
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
6329
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
6330
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
6331
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
6332
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
6333
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
6334
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
6335
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
6336
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
6337
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
6338
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
6339
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
6340
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
6341
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
6342
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
6343
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
6344
- # 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;
6345
6699
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
6346
6700
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
6347
6701
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
6348
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
6702
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
6349
6703
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
6350
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
6351
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
6352
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
6353
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
6354
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
6355
- # 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
+ # / ...
6356
6710
  class GoogleTypeColor
6357
6711
  include Google::Apis::Core::Hashable
6358
6712
 
6359
6713
  # The fraction of this color that should be applied to the pixel. That is, the
6360
- # final pixel color is defined by the equation: pixel color = alpha * (this
6361
- # 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
6362
6716
  # corresponds to a solid color, whereas a value of 0.0 corresponds to a
6363
6717
  # completely transparent color. This uses a wrapper message rather than a simple
6364
6718
  # float scalar so that it is possible to distinguish between a default value and
6365
- # the value being unset. If omitted, this color object is to be rendered as a
6366
- # solid color (as if the alpha value had been explicitly given with a value of 1.
6367
- # 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).
6368
6721
  # Corresponds to the JSON property `alpha`
6369
6722
  # @return [Float]
6370
6723
  attr_accessor :alpha