google-apis-documentai_v1 0.62.0 → 0.63.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -300,7 +300,7 @@ module Google
|
|
300
300
|
end
|
301
301
|
end
|
302
302
|
|
303
|
-
# The long
|
303
|
+
# The long-running operation metadata for CreateLabelerPool.
|
304
304
|
class GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata
|
305
305
|
include Google::Apis::Core::Hashable
|
306
306
|
|
@@ -319,7 +319,7 @@ module Google
|
|
319
319
|
end
|
320
320
|
end
|
321
321
|
|
322
|
-
# The long
|
322
|
+
# The long-running operation metadata for DeleteLabelerPool.
|
323
323
|
class GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata
|
324
324
|
include Google::Apis::Core::Hashable
|
325
325
|
|
@@ -338,7 +338,7 @@ module Google
|
|
338
338
|
end
|
339
339
|
end
|
340
340
|
|
341
|
-
# The long
|
341
|
+
# The long-running operation metadata for delete processor method.
|
342
342
|
class GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata
|
343
343
|
include Google::Apis::Core::Hashable
|
344
344
|
|
@@ -357,7 +357,7 @@ module Google
|
|
357
357
|
end
|
358
358
|
end
|
359
359
|
|
360
|
-
# The long
|
360
|
+
# The long-running operation metadata for delete processor version method.
|
361
361
|
class GoogleCloudDocumentaiUiv1beta3DeleteProcessorVersionMetadata
|
362
362
|
include Google::Apis::Core::Hashable
|
363
363
|
|
@@ -376,7 +376,7 @@ module Google
|
|
376
376
|
end
|
377
377
|
end
|
378
378
|
|
379
|
-
# The long
|
379
|
+
# The long-running operation metadata for deploy processor version method.
|
380
380
|
class GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionMetadata
|
381
381
|
include Google::Apis::Core::Hashable
|
382
382
|
|
@@ -408,7 +408,7 @@ module Google
|
|
408
408
|
end
|
409
409
|
end
|
410
410
|
|
411
|
-
# The long
|
411
|
+
# The long-running operation metadata for disable processor method.
|
412
412
|
class GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata
|
413
413
|
include Google::Apis::Core::Hashable
|
414
414
|
|
@@ -493,7 +493,7 @@ module Google
|
|
493
493
|
end
|
494
494
|
end
|
495
495
|
|
496
|
-
# The long
|
496
|
+
# The long-running operation metadata for enable processor method.
|
497
497
|
class GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata
|
498
498
|
include Google::Apis::Core::Hashable
|
499
499
|
|
@@ -545,7 +545,7 @@ module Google
|
|
545
545
|
end
|
546
546
|
end
|
547
547
|
|
548
|
-
#
|
548
|
+
# Response of the EvaluateProcessorVersion method.
|
549
549
|
class GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse
|
550
550
|
include Google::Apis::Core::Hashable
|
551
551
|
|
@@ -827,7 +827,7 @@ module Google
|
|
827
827
|
end
|
828
828
|
end
|
829
829
|
|
830
|
-
# The long
|
830
|
+
# The long-running operation metadata for the ImportProcessorVersion method.
|
831
831
|
class GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionMetadata
|
832
832
|
include Google::Apis::Core::Hashable
|
833
833
|
|
@@ -1010,7 +1010,7 @@ module Google
|
|
1010
1010
|
end
|
1011
1011
|
end
|
1012
1012
|
|
1013
|
-
# The long
|
1013
|
+
# The long-running operation metadata for set default processor version method.
|
1014
1014
|
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata
|
1015
1015
|
include Google::Apis::Core::Hashable
|
1016
1016
|
|
@@ -1116,7 +1116,7 @@ module Google
|
|
1116
1116
|
end
|
1117
1117
|
end
|
1118
1118
|
|
1119
|
-
# The response for
|
1119
|
+
# The response for TrainProcessorVersion.
|
1120
1120
|
class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionResponse
|
1121
1121
|
include Google::Apis::Core::Hashable
|
1122
1122
|
|
@@ -1135,7 +1135,7 @@ module Google
|
|
1135
1135
|
end
|
1136
1136
|
end
|
1137
1137
|
|
1138
|
-
# The long
|
1138
|
+
# The long-running operation metadata for the undeploy processor version method.
|
1139
1139
|
class GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionMetadata
|
1140
1140
|
include Google::Apis::Core::Hashable
|
1141
1141
|
|
@@ -1186,7 +1186,7 @@ module Google
|
|
1186
1186
|
end
|
1187
1187
|
end
|
1188
1188
|
|
1189
|
-
# The long
|
1189
|
+
# The long-running operation metadata for updating the human review
|
1190
1190
|
# configuration.
|
1191
1191
|
class GoogleCloudDocumentaiUiv1beta3UpdateHumanReviewConfigMetadata
|
1192
1192
|
include Google::Apis::Core::Hashable
|
@@ -1206,7 +1206,7 @@ module Google
|
|
1206
1206
|
end
|
1207
1207
|
end
|
1208
1208
|
|
1209
|
-
# The long
|
1209
|
+
# The long-running operation metadata for UpdateLabelerPool.
|
1210
1210
|
class GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata
|
1211
1211
|
include Google::Apis::Core::Hashable
|
1212
1212
|
|
@@ -1292,7 +1292,7 @@ module Google
|
|
1292
1292
|
end
|
1293
1293
|
end
|
1294
1294
|
|
1295
|
-
# The long
|
1295
|
+
# The long-running operation metadata for BatchProcessDocuments.
|
1296
1296
|
class GoogleCloudDocumentaiV1BatchProcessMetadata
|
1297
1297
|
include Google::Apis::Core::Hashable
|
1298
1298
|
|
@@ -1382,7 +1382,7 @@ module Google
|
|
1382
1382
|
end
|
1383
1383
|
end
|
1384
1384
|
|
1385
|
-
# Request message for
|
1385
|
+
# Request message for BatchProcessDocuments.
|
1386
1386
|
class GoogleCloudDocumentaiV1BatchProcessRequest
|
1387
1387
|
include Google::Apis::Core::Hashable
|
1388
1388
|
|
@@ -1416,7 +1416,7 @@ module Google
|
|
1416
1416
|
end
|
1417
1417
|
end
|
1418
1418
|
|
1419
|
-
# Response message for
|
1419
|
+
# Response message for BatchProcessDocuments.
|
1420
1420
|
class GoogleCloudDocumentaiV1BatchProcessResponse
|
1421
1421
|
include Google::Apis::Core::Hashable
|
1422
1422
|
|
@@ -1497,7 +1497,7 @@ module Google
|
|
1497
1497
|
end
|
1498
1498
|
end
|
1499
1499
|
|
1500
|
-
# The long
|
1500
|
+
# The long-running operation metadata for delete processor method.
|
1501
1501
|
class GoogleCloudDocumentaiV1DeleteProcessorMetadata
|
1502
1502
|
include Google::Apis::Core::Hashable
|
1503
1503
|
|
@@ -1516,7 +1516,7 @@ module Google
|
|
1516
1516
|
end
|
1517
1517
|
end
|
1518
1518
|
|
1519
|
-
# The long
|
1519
|
+
# The long-running operation metadata for delete processor version method.
|
1520
1520
|
class GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata
|
1521
1521
|
include Google::Apis::Core::Hashable
|
1522
1522
|
|
@@ -1535,7 +1535,7 @@ module Google
|
|
1535
1535
|
end
|
1536
1536
|
end
|
1537
1537
|
|
1538
|
-
# The long
|
1538
|
+
# The long-running operation metadata for deploy processor version method.
|
1539
1539
|
class GoogleCloudDocumentaiV1DeployProcessorVersionMetadata
|
1540
1540
|
include Google::Apis::Core::Hashable
|
1541
1541
|
|
@@ -1580,7 +1580,7 @@ module Google
|
|
1580
1580
|
end
|
1581
1581
|
end
|
1582
1582
|
|
1583
|
-
# The long
|
1583
|
+
# The long-running operation metadata for disable processor method.
|
1584
1584
|
class GoogleCloudDocumentaiV1DisableProcessorMetadata
|
1585
1585
|
include Google::Apis::Core::Hashable
|
1586
1586
|
|
@@ -2786,6 +2786,11 @@ module Google
|
|
2786
2786
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentProvenance]
|
2787
2787
|
attr_accessor :provenance
|
2788
2788
|
|
2789
|
+
# Font and other text style attributes.
|
2790
|
+
# Corresponds to the JSON property `styleInfo`
|
2791
|
+
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo]
|
2792
|
+
attr_accessor :style_info
|
2793
|
+
|
2789
2794
|
def initialize(**args)
|
2790
2795
|
update!(**args)
|
2791
2796
|
end
|
@@ -2796,6 +2801,7 @@ module Google
|
|
2796
2801
|
@detected_languages = args[:detected_languages] if args.key?(:detected_languages)
|
2797
2802
|
@layout = args[:layout] if args.key?(:layout)
|
2798
2803
|
@provenance = args[:provenance] if args.key?(:provenance)
|
2804
|
+
@style_info = args[:style_info] if args.key?(:style_info)
|
2799
2805
|
end
|
2800
2806
|
end
|
2801
2807
|
|
@@ -2818,6 +2824,206 @@ module Google
|
|
2818
2824
|
end
|
2819
2825
|
end
|
2820
2826
|
|
2827
|
+
# Font and other text style attributes.
|
2828
|
+
class GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo
|
2829
|
+
include Google::Apis::Core::Hashable
|
2830
|
+
|
2831
|
+
# Represents a color in the RGBA color space. This representation is designed
|
2832
|
+
# for simplicity of conversion to/from color representations in various
|
2833
|
+
# languages over compactness. For example, the fields of this representation can
|
2834
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
2835
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
2836
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
2837
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
2838
|
+
# information about the absolute color space that should be used to interpret
|
2839
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
2840
|
+
# applications should assume the sRGB color space. When color equality needs to
|
2841
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
2842
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
2843
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
2844
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
2845
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
2846
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
2847
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
2848
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
2849
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
2850
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
2851
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
2852
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
2853
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
2854
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
2855
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
2856
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
2857
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
2858
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
2859
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
2860
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
2861
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
2862
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
2863
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
2864
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
2865
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
2866
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
2867
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
2868
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
2869
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
2870
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
2871
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
2872
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
2873
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
2874
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
2875
|
+
# / ...
|
2876
|
+
# Corresponds to the JSON property `backgroundColor`
|
2877
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
2878
|
+
attr_accessor :background_color
|
2879
|
+
|
2880
|
+
# Whether the text is bold (equivalent to font weight >= 700).
|
2881
|
+
# Corresponds to the JSON property `bold`
|
2882
|
+
# @return [Boolean]
|
2883
|
+
attr_accessor :bold
|
2884
|
+
alias_method :bold?, :bold
|
2885
|
+
|
2886
|
+
# Font size in points (1 point is 1/72").
|
2887
|
+
# Corresponds to the JSON property `fontSize`
|
2888
|
+
# @return [Fixnum]
|
2889
|
+
attr_accessor :font_size
|
2890
|
+
|
2891
|
+
# Name or style of the font.
|
2892
|
+
# Corresponds to the JSON property `fontType`
|
2893
|
+
# @return [String]
|
2894
|
+
attr_accessor :font_type
|
2895
|
+
|
2896
|
+
# TrueType weight on a scale 100 (Thin) to 1000 (Ultra-heavy). Normal is 400,
|
2897
|
+
# Bold is 700.
|
2898
|
+
# Corresponds to the JSON property `fontWeight`
|
2899
|
+
# @return [Fixnum]
|
2900
|
+
attr_accessor :font_weight
|
2901
|
+
|
2902
|
+
# Whether the text is handwritten.
|
2903
|
+
# Corresponds to the JSON property `handwritten`
|
2904
|
+
# @return [Boolean]
|
2905
|
+
attr_accessor :handwritten
|
2906
|
+
alias_method :handwritten?, :handwritten
|
2907
|
+
|
2908
|
+
# Whether the text is italic.
|
2909
|
+
# Corresponds to the JSON property `italic`
|
2910
|
+
# @return [Boolean]
|
2911
|
+
attr_accessor :italic
|
2912
|
+
alias_method :italic?, :italic
|
2913
|
+
|
2914
|
+
# Letter spacing in points.
|
2915
|
+
# Corresponds to the JSON property `letterSpacing`
|
2916
|
+
# @return [Float]
|
2917
|
+
attr_accessor :letter_spacing
|
2918
|
+
|
2919
|
+
# Font size in pixels, equal to unrounded_fontsize * resolution / 72.0.
|
2920
|
+
# Corresponds to the JSON property `pixelFontSize`
|
2921
|
+
# @return [Float]
|
2922
|
+
attr_accessor :pixel_font_size
|
2923
|
+
|
2924
|
+
# Whether the text are small caps.
|
2925
|
+
# Corresponds to the JSON property `smallcaps`
|
2926
|
+
# @return [Boolean]
|
2927
|
+
attr_accessor :smallcaps
|
2928
|
+
alias_method :smallcaps?, :smallcaps
|
2929
|
+
|
2930
|
+
# Whether the text is strikethrough.
|
2931
|
+
# Corresponds to the JSON property `strikeout`
|
2932
|
+
# @return [Boolean]
|
2933
|
+
attr_accessor :strikeout
|
2934
|
+
alias_method :strikeout?, :strikeout
|
2935
|
+
|
2936
|
+
# Whether the text is a subscript.
|
2937
|
+
# Corresponds to the JSON property `subscript`
|
2938
|
+
# @return [Boolean]
|
2939
|
+
attr_accessor :subscript
|
2940
|
+
alias_method :subscript?, :subscript
|
2941
|
+
|
2942
|
+
# Whether the text is a superscript.
|
2943
|
+
# Corresponds to the JSON property `superscript`
|
2944
|
+
# @return [Boolean]
|
2945
|
+
attr_accessor :superscript
|
2946
|
+
alias_method :superscript?, :superscript
|
2947
|
+
|
2948
|
+
# Represents a color in the RGBA color space. This representation is designed
|
2949
|
+
# for simplicity of conversion to/from color representations in various
|
2950
|
+
# languages over compactness. For example, the fields of this representation can
|
2951
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
2952
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
2953
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
2954
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
2955
|
+
# information about the absolute color space that should be used to interpret
|
2956
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
2957
|
+
# applications should assume the sRGB color space. When color equality needs to
|
2958
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
2959
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
2960
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
2961
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
2962
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
2963
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
2964
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
2965
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
2966
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
2967
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
2968
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
2969
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
2970
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
2971
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
2972
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
2973
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
2974
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
2975
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
2976
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
2977
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
2978
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
2979
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
2980
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
2981
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
2982
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
2983
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
2984
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
2985
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
2986
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
2987
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
2988
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
2989
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
2990
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
2991
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
2992
|
+
# / ...
|
2993
|
+
# Corresponds to the JSON property `textColor`
|
2994
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
2995
|
+
attr_accessor :text_color
|
2996
|
+
|
2997
|
+
# Whether the text is underlined.
|
2998
|
+
# Corresponds to the JSON property `underlined`
|
2999
|
+
# @return [Boolean]
|
3000
|
+
attr_accessor :underlined
|
3001
|
+
alias_method :underlined?, :underlined
|
3002
|
+
|
3003
|
+
def initialize(**args)
|
3004
|
+
update!(**args)
|
3005
|
+
end
|
3006
|
+
|
3007
|
+
# Update properties of this object
|
3008
|
+
def update!(**args)
|
3009
|
+
@background_color = args[:background_color] if args.key?(:background_color)
|
3010
|
+
@bold = args[:bold] if args.key?(:bold)
|
3011
|
+
@font_size = args[:font_size] if args.key?(:font_size)
|
3012
|
+
@font_type = args[:font_type] if args.key?(:font_type)
|
3013
|
+
@font_weight = args[:font_weight] if args.key?(:font_weight)
|
3014
|
+
@handwritten = args[:handwritten] if args.key?(:handwritten)
|
3015
|
+
@italic = args[:italic] if args.key?(:italic)
|
3016
|
+
@letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
|
3017
|
+
@pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
|
3018
|
+
@smallcaps = args[:smallcaps] if args.key?(:smallcaps)
|
3019
|
+
@strikeout = args[:strikeout] if args.key?(:strikeout)
|
3020
|
+
@subscript = args[:subscript] if args.key?(:subscript)
|
3021
|
+
@superscript = args[:superscript] if args.key?(:superscript)
|
3022
|
+
@text_color = args[:text_color] if args.key?(:text_color)
|
3023
|
+
@underlined = args[:underlined] if args.key?(:underlined)
|
3024
|
+
end
|
3025
|
+
end
|
3026
|
+
|
2821
3027
|
# Detected non-text visual elements e.g. checkbox, signature etc. on the page.
|
2822
3028
|
class GoogleCloudDocumentaiV1DocumentPageVisualElement
|
2823
3029
|
include Google::Apis::Core::Hashable
|
@@ -3491,7 +3697,7 @@ module Google
|
|
3491
3697
|
end
|
3492
3698
|
end
|
3493
3699
|
|
3494
|
-
# The long
|
3700
|
+
# The long-running operation metadata for enable processor method.
|
3495
3701
|
class GoogleCloudDocumentaiV1EnableProcessorMetadata
|
3496
3702
|
include Google::Apis::Core::Hashable
|
3497
3703
|
|
@@ -3575,7 +3781,7 @@ module Google
|
|
3575
3781
|
end
|
3576
3782
|
end
|
3577
3783
|
|
3578
|
-
#
|
3784
|
+
# Response of the EvaluateProcessorVersion method.
|
3579
3785
|
class GoogleCloudDocumentaiV1EvaluateProcessorVersionResponse
|
3580
3786
|
include Google::Apis::Core::Hashable
|
3581
3787
|
|
@@ -3976,9 +4182,9 @@ module Google
|
|
3976
4182
|
include Google::Apis::Core::Hashable
|
3977
4183
|
|
3978
4184
|
# The name of the operation triggered by the processed document. This field is
|
3979
|
-
# populated only when the
|
3980
|
-
# response type and metadata as the long
|
3981
|
-
# ReviewDocument
|
4185
|
+
# populated only when the state is `HUMAN_REVIEW_IN_PROGRESS`. It has the same
|
4186
|
+
# response type and metadata as the long-running operation returned by
|
4187
|
+
# ReviewDocument.
|
3982
4188
|
# Corresponds to the JSON property `humanReviewOperation`
|
3983
4189
|
# @return [String]
|
3984
4190
|
attr_accessor :human_review_operation
|
@@ -4005,7 +4211,7 @@ module Google
|
|
4005
4211
|
end
|
4006
4212
|
end
|
4007
4213
|
|
4008
|
-
# The response from ListEvaluations
|
4214
|
+
# The response from `ListEvaluations`.
|
4009
4215
|
class GoogleCloudDocumentaiV1ListEvaluationsResponse
|
4010
4216
|
include Google::Apis::Core::Hashable
|
4011
4217
|
|
@@ -4136,8 +4342,8 @@ module Google
|
|
4136
4342
|
class GoogleCloudDocumentaiV1ProcessRequest
|
4137
4343
|
include Google::Apis::Core::Hashable
|
4138
4344
|
|
4139
|
-
# Specifies which fields to include in ProcessResponse
|
4140
|
-
# top level document and pages field so it must be in the form of ``
|
4345
|
+
# Specifies which fields to include in the `ProcessResponse` Document. Only
|
4346
|
+
# supports top level document and pages field so it must be in the form of ``
|
4141
4347
|
# document_field_name`` or `pages.`page_field_name``.
|
4142
4348
|
# Corresponds to the JSON property `fieldMask`
|
4143
4349
|
# @return [String]
|
@@ -4247,8 +4453,8 @@ module Google
|
|
4247
4453
|
# @return [String]
|
4248
4454
|
attr_accessor :state
|
4249
4455
|
|
4250
|
-
# The processor type,
|
4251
|
-
# list of
|
4456
|
+
# The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. To get a
|
4457
|
+
# list of processor types, see FetchProcessorTypes.
|
4252
4458
|
# Corresponds to the JSON property `type`
|
4253
4459
|
# @return [String]
|
4254
4460
|
attr_accessor :type
|
@@ -4308,7 +4514,7 @@ module Google
|
|
4308
4514
|
# @return [Array<String>]
|
4309
4515
|
attr_accessor :sample_document_uris
|
4310
4516
|
|
4311
|
-
# The processor type,
|
4517
|
+
# The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`.
|
4312
4518
|
# Corresponds to the JSON property `type`
|
4313
4519
|
# @return [String]
|
4314
4520
|
attr_accessor :type
|
@@ -4479,7 +4685,7 @@ module Google
|
|
4479
4685
|
end
|
4480
4686
|
end
|
4481
4687
|
|
4482
|
-
# The long
|
4688
|
+
# The long-running operation metadata for review document method.
|
4483
4689
|
class GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata
|
4484
4690
|
include Google::Apis::Core::Hashable
|
4485
4691
|
|
@@ -4577,7 +4783,7 @@ module Google
|
|
4577
4783
|
end
|
4578
4784
|
end
|
4579
4785
|
|
4580
|
-
# The long
|
4786
|
+
# The long-running operation metadata for set default processor version method.
|
4581
4787
|
class GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata
|
4582
4788
|
include Google::Apis::Core::Hashable
|
4583
4789
|
|
@@ -4772,7 +4978,7 @@ module Google
|
|
4772
4978
|
end
|
4773
4979
|
end
|
4774
4980
|
|
4775
|
-
# The response for
|
4981
|
+
# The response for TrainProcessorVersion.
|
4776
4982
|
class GoogleCloudDocumentaiV1TrainProcessorVersionResponse
|
4777
4983
|
include Google::Apis::Core::Hashable
|
4778
4984
|
|
@@ -4791,7 +4997,7 @@ module Google
|
|
4791
4997
|
end
|
4792
4998
|
end
|
4793
4999
|
|
4794
|
-
# The long
|
5000
|
+
# The long-running operation metadata for the undeploy processor version method.
|
4795
5001
|
class GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata
|
4796
5002
|
include Google::Apis::Core::Hashable
|
4797
5003
|
|
@@ -6031,6 +6237,11 @@ module Google
|
|
6031
6237
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta1DocumentProvenance]
|
6032
6238
|
attr_accessor :provenance
|
6033
6239
|
|
6240
|
+
# Font and other text style attributes.
|
6241
|
+
# Corresponds to the JSON property `styleInfo`
|
6242
|
+
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo]
|
6243
|
+
attr_accessor :style_info
|
6244
|
+
|
6034
6245
|
def initialize(**args)
|
6035
6246
|
update!(**args)
|
6036
6247
|
end
|
@@ -6041,6 +6252,7 @@ module Google
|
|
6041
6252
|
@detected_languages = args[:detected_languages] if args.key?(:detected_languages)
|
6042
6253
|
@layout = args[:layout] if args.key?(:layout)
|
6043
6254
|
@provenance = args[:provenance] if args.key?(:provenance)
|
6255
|
+
@style_info = args[:style_info] if args.key?(:style_info)
|
6044
6256
|
end
|
6045
6257
|
end
|
6046
6258
|
|
@@ -6063,6 +6275,206 @@ module Google
|
|
6063
6275
|
end
|
6064
6276
|
end
|
6065
6277
|
|
6278
|
+
# Font and other text style attributes.
|
6279
|
+
class GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo
|
6280
|
+
include Google::Apis::Core::Hashable
|
6281
|
+
|
6282
|
+
# Represents a color in the RGBA color space. This representation is designed
|
6283
|
+
# for simplicity of conversion to/from color representations in various
|
6284
|
+
# languages over compactness. For example, the fields of this representation can
|
6285
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6286
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6287
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6288
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6289
|
+
# information about the absolute color space that should be used to interpret
|
6290
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6291
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6292
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6293
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6294
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6295
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6296
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6297
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6298
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6299
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6300
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6301
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6302
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6303
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6304
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6305
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6306
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6307
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6308
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6309
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6310
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6311
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6312
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6313
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6314
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6315
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6316
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6317
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6318
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6319
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6320
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6321
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6322
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6323
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6324
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6325
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6326
|
+
# / ...
|
6327
|
+
# Corresponds to the JSON property `backgroundColor`
|
6328
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
6329
|
+
attr_accessor :background_color
|
6330
|
+
|
6331
|
+
# Whether the text is bold (equivalent to font weight >= 700).
|
6332
|
+
# Corresponds to the JSON property `bold`
|
6333
|
+
# @return [Boolean]
|
6334
|
+
attr_accessor :bold
|
6335
|
+
alias_method :bold?, :bold
|
6336
|
+
|
6337
|
+
# Font size in points (1 point is 1/72").
|
6338
|
+
# Corresponds to the JSON property `fontSize`
|
6339
|
+
# @return [Fixnum]
|
6340
|
+
attr_accessor :font_size
|
6341
|
+
|
6342
|
+
# Name or style of the font.
|
6343
|
+
# Corresponds to the JSON property `fontType`
|
6344
|
+
# @return [String]
|
6345
|
+
attr_accessor :font_type
|
6346
|
+
|
6347
|
+
# TrueType weight on a scale 100 (Thin) to 1000 (Ultra-heavy). Normal is 400,
|
6348
|
+
# Bold is 700.
|
6349
|
+
# Corresponds to the JSON property `fontWeight`
|
6350
|
+
# @return [Fixnum]
|
6351
|
+
attr_accessor :font_weight
|
6352
|
+
|
6353
|
+
# Whether the text is handwritten.
|
6354
|
+
# Corresponds to the JSON property `handwritten`
|
6355
|
+
# @return [Boolean]
|
6356
|
+
attr_accessor :handwritten
|
6357
|
+
alias_method :handwritten?, :handwritten
|
6358
|
+
|
6359
|
+
# Whether the text is italic.
|
6360
|
+
# Corresponds to the JSON property `italic`
|
6361
|
+
# @return [Boolean]
|
6362
|
+
attr_accessor :italic
|
6363
|
+
alias_method :italic?, :italic
|
6364
|
+
|
6365
|
+
# Letter spacing in points.
|
6366
|
+
# Corresponds to the JSON property `letterSpacing`
|
6367
|
+
# @return [Float]
|
6368
|
+
attr_accessor :letter_spacing
|
6369
|
+
|
6370
|
+
# Font size in pixels, equal to unrounded_fontsize * resolution / 72.0.
|
6371
|
+
# Corresponds to the JSON property `pixelFontSize`
|
6372
|
+
# @return [Float]
|
6373
|
+
attr_accessor :pixel_font_size
|
6374
|
+
|
6375
|
+
# Whether the text are small caps.
|
6376
|
+
# Corresponds to the JSON property `smallcaps`
|
6377
|
+
# @return [Boolean]
|
6378
|
+
attr_accessor :smallcaps
|
6379
|
+
alias_method :smallcaps?, :smallcaps
|
6380
|
+
|
6381
|
+
# Whether the text is strikethrough.
|
6382
|
+
# Corresponds to the JSON property `strikeout`
|
6383
|
+
# @return [Boolean]
|
6384
|
+
attr_accessor :strikeout
|
6385
|
+
alias_method :strikeout?, :strikeout
|
6386
|
+
|
6387
|
+
# Whether the text is a subscript.
|
6388
|
+
# Corresponds to the JSON property `subscript`
|
6389
|
+
# @return [Boolean]
|
6390
|
+
attr_accessor :subscript
|
6391
|
+
alias_method :subscript?, :subscript
|
6392
|
+
|
6393
|
+
# Whether the text is a superscript.
|
6394
|
+
# Corresponds to the JSON property `superscript`
|
6395
|
+
# @return [Boolean]
|
6396
|
+
attr_accessor :superscript
|
6397
|
+
alias_method :superscript?, :superscript
|
6398
|
+
|
6399
|
+
# Represents a color in the RGBA color space. This representation is designed
|
6400
|
+
# for simplicity of conversion to/from color representations in various
|
6401
|
+
# languages over compactness. For example, the fields of this representation can
|
6402
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6403
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6404
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6405
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6406
|
+
# information about the absolute color space that should be used to interpret
|
6407
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6408
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6409
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6410
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6411
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6412
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6413
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6414
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6415
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6416
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6417
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6418
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6419
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6420
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6421
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6422
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6423
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6424
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6425
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6426
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6427
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6428
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6429
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6430
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6431
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6432
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6433
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6434
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6435
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6436
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6437
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6438
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6439
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6440
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6441
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6442
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6443
|
+
# / ...
|
6444
|
+
# Corresponds to the JSON property `textColor`
|
6445
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
6446
|
+
attr_accessor :text_color
|
6447
|
+
|
6448
|
+
# Whether the text is underlined.
|
6449
|
+
# Corresponds to the JSON property `underlined`
|
6450
|
+
# @return [Boolean]
|
6451
|
+
attr_accessor :underlined
|
6452
|
+
alias_method :underlined?, :underlined
|
6453
|
+
|
6454
|
+
def initialize(**args)
|
6455
|
+
update!(**args)
|
6456
|
+
end
|
6457
|
+
|
6458
|
+
# Update properties of this object
|
6459
|
+
def update!(**args)
|
6460
|
+
@background_color = args[:background_color] if args.key?(:background_color)
|
6461
|
+
@bold = args[:bold] if args.key?(:bold)
|
6462
|
+
@font_size = args[:font_size] if args.key?(:font_size)
|
6463
|
+
@font_type = args[:font_type] if args.key?(:font_type)
|
6464
|
+
@font_weight = args[:font_weight] if args.key?(:font_weight)
|
6465
|
+
@handwritten = args[:handwritten] if args.key?(:handwritten)
|
6466
|
+
@italic = args[:italic] if args.key?(:italic)
|
6467
|
+
@letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
|
6468
|
+
@pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
|
6469
|
+
@smallcaps = args[:smallcaps] if args.key?(:smallcaps)
|
6470
|
+
@strikeout = args[:strikeout] if args.key?(:strikeout)
|
6471
|
+
@subscript = args[:subscript] if args.key?(:subscript)
|
6472
|
+
@superscript = args[:superscript] if args.key?(:superscript)
|
6473
|
+
@text_color = args[:text_color] if args.key?(:text_color)
|
6474
|
+
@underlined = args[:underlined] if args.key?(:underlined)
|
6475
|
+
end
|
6476
|
+
end
|
6477
|
+
|
6066
6478
|
# Detected non-text visual elements e.g. checkbox, signature etc. on the page.
|
6067
6479
|
class GoogleCloudDocumentaiV1beta1DocumentPageVisualElement
|
6068
6480
|
include Google::Apis::Core::Hashable
|
@@ -7974,6 +8386,11 @@ module Google
|
|
7974
8386
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta2DocumentProvenance]
|
7975
8387
|
attr_accessor :provenance
|
7976
8388
|
|
8389
|
+
# Font and other text style attributes.
|
8390
|
+
# Corresponds to the JSON property `styleInfo`
|
8391
|
+
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo]
|
8392
|
+
attr_accessor :style_info
|
8393
|
+
|
7977
8394
|
def initialize(**args)
|
7978
8395
|
update!(**args)
|
7979
8396
|
end
|
@@ -7984,6 +8401,7 @@ module Google
|
|
7984
8401
|
@detected_languages = args[:detected_languages] if args.key?(:detected_languages)
|
7985
8402
|
@layout = args[:layout] if args.key?(:layout)
|
7986
8403
|
@provenance = args[:provenance] if args.key?(:provenance)
|
8404
|
+
@style_info = args[:style_info] if args.key?(:style_info)
|
7987
8405
|
end
|
7988
8406
|
end
|
7989
8407
|
|
@@ -8006,6 +8424,206 @@ module Google
|
|
8006
8424
|
end
|
8007
8425
|
end
|
8008
8426
|
|
8427
|
+
# Font and other text style attributes.
|
8428
|
+
class GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo
|
8429
|
+
include Google::Apis::Core::Hashable
|
8430
|
+
|
8431
|
+
# Represents a color in the RGBA color space. This representation is designed
|
8432
|
+
# for simplicity of conversion to/from color representations in various
|
8433
|
+
# languages over compactness. For example, the fields of this representation can
|
8434
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
8435
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
8436
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
8437
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
8438
|
+
# information about the absolute color space that should be used to interpret
|
8439
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
8440
|
+
# applications should assume the sRGB color space. When color equality needs to
|
8441
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
8442
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
8443
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
8444
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
8445
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
8446
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
8447
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
8448
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
8449
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
8450
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
8451
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
8452
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
8453
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
8454
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
8455
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
8456
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
8457
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
8458
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
8459
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
8460
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
8461
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
8462
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
8463
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
8464
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
8465
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
8466
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
8467
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
8468
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
8469
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
8470
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
8471
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
8472
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
8473
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
8474
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
8475
|
+
# / ...
|
8476
|
+
# Corresponds to the JSON property `backgroundColor`
|
8477
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
8478
|
+
attr_accessor :background_color
|
8479
|
+
|
8480
|
+
# Whether the text is bold (equivalent to font weight >= 700).
|
8481
|
+
# Corresponds to the JSON property `bold`
|
8482
|
+
# @return [Boolean]
|
8483
|
+
attr_accessor :bold
|
8484
|
+
alias_method :bold?, :bold
|
8485
|
+
|
8486
|
+
# Font size in points (1 point is 1/72").
|
8487
|
+
# Corresponds to the JSON property `fontSize`
|
8488
|
+
# @return [Fixnum]
|
8489
|
+
attr_accessor :font_size
|
8490
|
+
|
8491
|
+
# Name or style of the font.
|
8492
|
+
# Corresponds to the JSON property `fontType`
|
8493
|
+
# @return [String]
|
8494
|
+
attr_accessor :font_type
|
8495
|
+
|
8496
|
+
# TrueType weight on a scale 100 (Thin) to 1000 (Ultra-heavy). Normal is 400,
|
8497
|
+
# Bold is 700.
|
8498
|
+
# Corresponds to the JSON property `fontWeight`
|
8499
|
+
# @return [Fixnum]
|
8500
|
+
attr_accessor :font_weight
|
8501
|
+
|
8502
|
+
# Whether the text is handwritten.
|
8503
|
+
# Corresponds to the JSON property `handwritten`
|
8504
|
+
# @return [Boolean]
|
8505
|
+
attr_accessor :handwritten
|
8506
|
+
alias_method :handwritten?, :handwritten
|
8507
|
+
|
8508
|
+
# Whether the text is italic.
|
8509
|
+
# Corresponds to the JSON property `italic`
|
8510
|
+
# @return [Boolean]
|
8511
|
+
attr_accessor :italic
|
8512
|
+
alias_method :italic?, :italic
|
8513
|
+
|
8514
|
+
# Letter spacing in points.
|
8515
|
+
# Corresponds to the JSON property `letterSpacing`
|
8516
|
+
# @return [Float]
|
8517
|
+
attr_accessor :letter_spacing
|
8518
|
+
|
8519
|
+
# Font size in pixels, equal to unrounded_fontsize * resolution / 72.0.
|
8520
|
+
# Corresponds to the JSON property `pixelFontSize`
|
8521
|
+
# @return [Float]
|
8522
|
+
attr_accessor :pixel_font_size
|
8523
|
+
|
8524
|
+
# Whether the text are small caps.
|
8525
|
+
# Corresponds to the JSON property `smallcaps`
|
8526
|
+
# @return [Boolean]
|
8527
|
+
attr_accessor :smallcaps
|
8528
|
+
alias_method :smallcaps?, :smallcaps
|
8529
|
+
|
8530
|
+
# Whether the text is strikethrough.
|
8531
|
+
# Corresponds to the JSON property `strikeout`
|
8532
|
+
# @return [Boolean]
|
8533
|
+
attr_accessor :strikeout
|
8534
|
+
alias_method :strikeout?, :strikeout
|
8535
|
+
|
8536
|
+
# Whether the text is a subscript.
|
8537
|
+
# Corresponds to the JSON property `subscript`
|
8538
|
+
# @return [Boolean]
|
8539
|
+
attr_accessor :subscript
|
8540
|
+
alias_method :subscript?, :subscript
|
8541
|
+
|
8542
|
+
# Whether the text is a superscript.
|
8543
|
+
# Corresponds to the JSON property `superscript`
|
8544
|
+
# @return [Boolean]
|
8545
|
+
attr_accessor :superscript
|
8546
|
+
alias_method :superscript?, :superscript
|
8547
|
+
|
8548
|
+
# Represents a color in the RGBA color space. This representation is designed
|
8549
|
+
# for simplicity of conversion to/from color representations in various
|
8550
|
+
# languages over compactness. For example, the fields of this representation can
|
8551
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
8552
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
8553
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
8554
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
8555
|
+
# information about the absolute color space that should be used to interpret
|
8556
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
8557
|
+
# applications should assume the sRGB color space. When color equality needs to
|
8558
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
8559
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
8560
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
8561
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
8562
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
8563
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
8564
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
8565
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
8566
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
8567
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
8568
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
8569
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
8570
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
8571
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
8572
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
8573
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
8574
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
8575
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
8576
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
8577
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
8578
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
8579
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
8580
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
8581
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
8582
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
8583
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
8584
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
8585
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
8586
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
8587
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
8588
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
8589
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
8590
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
8591
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
8592
|
+
# / ...
|
8593
|
+
# Corresponds to the JSON property `textColor`
|
8594
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
8595
|
+
attr_accessor :text_color
|
8596
|
+
|
8597
|
+
# Whether the text is underlined.
|
8598
|
+
# Corresponds to the JSON property `underlined`
|
8599
|
+
# @return [Boolean]
|
8600
|
+
attr_accessor :underlined
|
8601
|
+
alias_method :underlined?, :underlined
|
8602
|
+
|
8603
|
+
def initialize(**args)
|
8604
|
+
update!(**args)
|
8605
|
+
end
|
8606
|
+
|
8607
|
+
# Update properties of this object
|
8608
|
+
def update!(**args)
|
8609
|
+
@background_color = args[:background_color] if args.key?(:background_color)
|
8610
|
+
@bold = args[:bold] if args.key?(:bold)
|
8611
|
+
@font_size = args[:font_size] if args.key?(:font_size)
|
8612
|
+
@font_type = args[:font_type] if args.key?(:font_type)
|
8613
|
+
@font_weight = args[:font_weight] if args.key?(:font_weight)
|
8614
|
+
@handwritten = args[:handwritten] if args.key?(:handwritten)
|
8615
|
+
@italic = args[:italic] if args.key?(:italic)
|
8616
|
+
@letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
|
8617
|
+
@pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
|
8618
|
+
@smallcaps = args[:smallcaps] if args.key?(:smallcaps)
|
8619
|
+
@strikeout = args[:strikeout] if args.key?(:strikeout)
|
8620
|
+
@subscript = args[:subscript] if args.key?(:subscript)
|
8621
|
+
@superscript = args[:superscript] if args.key?(:superscript)
|
8622
|
+
@text_color = args[:text_color] if args.key?(:text_color)
|
8623
|
+
@underlined = args[:underlined] if args.key?(:underlined)
|
8624
|
+
end
|
8625
|
+
end
|
8626
|
+
|
8009
8627
|
# Detected non-text visual elements e.g. checkbox, signature etc. on the page.
|
8010
8628
|
class GoogleCloudDocumentaiV1beta2DocumentPageVisualElement
|
8011
8629
|
include Google::Apis::Core::Hashable
|
@@ -8715,7 +9333,7 @@ module Google
|
|
8715
9333
|
end
|
8716
9334
|
end
|
8717
9335
|
|
8718
|
-
# The long
|
9336
|
+
# The long-running operation metadata for BatchProcessDocuments.
|
8719
9337
|
class GoogleCloudDocumentaiV1beta3BatchProcessMetadata
|
8720
9338
|
include Google::Apis::Core::Hashable
|
8721
9339
|
|
@@ -8764,8 +9382,8 @@ module Google
|
|
8764
9382
|
include Google::Apis::Core::Hashable
|
8765
9383
|
|
8766
9384
|
# The name of the operation triggered by the processed document. If the human
|
8767
|
-
# review process
|
8768
|
-
# response type and metadata as the long
|
9385
|
+
# review process isn't triggered, this field will be empty. It has the same
|
9386
|
+
# response type and metadata as the long-running operation returned by
|
8769
9387
|
# ReviewDocument method.
|
8770
9388
|
# Corresponds to the JSON property `humanReviewOperation`
|
8771
9389
|
# @return [String]
|
@@ -8814,7 +9432,7 @@ module Google
|
|
8814
9432
|
end
|
8815
9433
|
end
|
8816
9434
|
|
8817
|
-
# Response message for
|
9435
|
+
# Response message for BatchProcessDocuments.
|
8818
9436
|
class GoogleCloudDocumentaiV1beta3BatchProcessResponse
|
8819
9437
|
include Google::Apis::Core::Hashable
|
8820
9438
|
|
@@ -8870,7 +9488,7 @@ module Google
|
|
8870
9488
|
end
|
8871
9489
|
end
|
8872
9490
|
|
8873
|
-
# The long
|
9491
|
+
# The long-running operation metadata for delete processor method.
|
8874
9492
|
class GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata
|
8875
9493
|
include Google::Apis::Core::Hashable
|
8876
9494
|
|
@@ -8889,7 +9507,7 @@ module Google
|
|
8889
9507
|
end
|
8890
9508
|
end
|
8891
9509
|
|
8892
|
-
# The long
|
9510
|
+
# The long-running operation metadata for delete processor version method.
|
8893
9511
|
class GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata
|
8894
9512
|
include Google::Apis::Core::Hashable
|
8895
9513
|
|
@@ -8908,7 +9526,7 @@ module Google
|
|
8908
9526
|
end
|
8909
9527
|
end
|
8910
9528
|
|
8911
|
-
# The long
|
9529
|
+
# The long-running operation metadata for deploy processor version method.
|
8912
9530
|
class GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata
|
8913
9531
|
include Google::Apis::Core::Hashable
|
8914
9532
|
|
@@ -8940,7 +9558,7 @@ module Google
|
|
8940
9558
|
end
|
8941
9559
|
end
|
8942
9560
|
|
8943
|
-
# The long
|
9561
|
+
# The long-running operation metadata for disable processor method.
|
8944
9562
|
class GoogleCloudDocumentaiV1beta3DisableProcessorMetadata
|
8945
9563
|
include Google::Apis::Core::Hashable
|
8946
9564
|
|
@@ -8973,7 +9591,7 @@ module Google
|
|
8973
9591
|
end
|
8974
9592
|
end
|
8975
9593
|
|
8976
|
-
# The long
|
9594
|
+
# The long-running operation metadata for enable processor method.
|
8977
9595
|
class GoogleCloudDocumentaiV1beta3EnableProcessorMetadata
|
8978
9596
|
include Google::Apis::Core::Hashable
|
8979
9597
|
|
@@ -9025,7 +9643,7 @@ module Google
|
|
9025
9643
|
end
|
9026
9644
|
end
|
9027
9645
|
|
9028
|
-
#
|
9646
|
+
# Response of the EvaluateProcessorVersion method.
|
9029
9647
|
class GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse
|
9030
9648
|
include Google::Apis::Core::Hashable
|
9031
9649
|
|
@@ -9049,9 +9667,9 @@ module Google
|
|
9049
9667
|
include Google::Apis::Core::Hashable
|
9050
9668
|
|
9051
9669
|
# The name of the operation triggered by the processed document. This field is
|
9052
|
-
# populated only when the
|
9053
|
-
# response type and metadata as the long
|
9054
|
-
# ReviewDocument
|
9670
|
+
# populated only when the state is `HUMAN_REVIEW_IN_PROGRESS`. It has the same
|
9671
|
+
# response type and metadata as the long-running operation returned by
|
9672
|
+
# ReviewDocument.
|
9055
9673
|
# Corresponds to the JSON property `humanReviewOperation`
|
9056
9674
|
# @return [String]
|
9057
9675
|
attr_accessor :human_review_operation
|
@@ -9078,7 +9696,7 @@ module Google
|
|
9078
9696
|
end
|
9079
9697
|
end
|
9080
9698
|
|
9081
|
-
# The long
|
9699
|
+
# The long-running operation metadata for the ImportProcessorVersion method.
|
9082
9700
|
class GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata
|
9083
9701
|
include Google::Apis::Core::Hashable
|
9084
9702
|
|
@@ -9116,7 +9734,7 @@ module Google
|
|
9116
9734
|
end
|
9117
9735
|
end
|
9118
9736
|
|
9119
|
-
# The long
|
9737
|
+
# The long-running operation metadata for review document method.
|
9120
9738
|
class GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata
|
9121
9739
|
include Google::Apis::Core::Hashable
|
9122
9740
|
|
@@ -9198,7 +9816,7 @@ module Google
|
|
9198
9816
|
end
|
9199
9817
|
end
|
9200
9818
|
|
9201
|
-
# The long
|
9819
|
+
# The long-running operation metadata for set default processor version method.
|
9202
9820
|
class GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata
|
9203
9821
|
include Google::Apis::Core::Hashable
|
9204
9822
|
|
@@ -9304,7 +9922,7 @@ module Google
|
|
9304
9922
|
end
|
9305
9923
|
end
|
9306
9924
|
|
9307
|
-
# The response for
|
9925
|
+
# The response for TrainProcessorVersion.
|
9308
9926
|
class GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse
|
9309
9927
|
include Google::Apis::Core::Hashable
|
9310
9928
|
|
@@ -9323,7 +9941,7 @@ module Google
|
|
9323
9941
|
end
|
9324
9942
|
end
|
9325
9943
|
|
9326
|
-
# The long
|
9944
|
+
# The long-running operation metadata for the undeploy processor version method.
|
9327
9945
|
class GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata
|
9328
9946
|
include Google::Apis::Core::Hashable
|
9329
9947
|
|
@@ -9380,7 +9998,7 @@ module Google
|
|
9380
9998
|
end
|
9381
9999
|
end
|
9382
10000
|
|
9383
|
-
# A resource that represents Google Cloud
|
10001
|
+
# A resource that represents a Google Cloud location.
|
9384
10002
|
class GoogleCloudLocationLocation
|
9385
10003
|
include Google::Apis::Core::Hashable
|
9386
10004
|
|