google-apis-documentai_v1beta3 0.70.0 → 0.71.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 running operation metadata for CreateLabelerPool.
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 running operation metadata for DeleteLabelerPool.
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 running operation metadata for delete processor method.
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 running operation metadata for delete processor version method.
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 running operation metadata for deploy processor version method.
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 running operation metadata for disable processor method.
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 running operation metadata for enable processor method.
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
- # Metadata of the EvaluateProcessorVersion method.
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 running operation metadata for the ImportProcessorVersion method.
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 running operation metadata for set default processor version method.
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 the TrainProcessorVersion method.
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 running operation metadata for the undeploy processor version method.
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 running operation metadata for updating the human review
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 running operation metadata for UpdateLabelerPool.
1209
+ # The long-running operation metadata for UpdateLabelerPool.
1210
1210
  class GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata
1211
1211
  include Google::Apis::Core::Hashable
1212
1212
 
@@ -1225,7 +1225,7 @@ module Google
1225
1225
  end
1226
1226
  end
1227
1227
 
1228
- # The long running operation metadata for batch process method.
1228
+ # The long-running operation metadata for BatchProcessDocuments.
1229
1229
  class GoogleCloudDocumentaiV1BatchProcessMetadata
1230
1230
  include Google::Apis::Core::Hashable
1231
1231
 
@@ -1315,7 +1315,7 @@ module Google
1315
1315
  end
1316
1316
  end
1317
1317
 
1318
- # Response message for batch process document method.
1318
+ # Response message for BatchProcessDocuments.
1319
1319
  class GoogleCloudDocumentaiV1BatchProcessResponse
1320
1320
  include Google::Apis::Core::Hashable
1321
1321
 
@@ -1371,7 +1371,7 @@ module Google
1371
1371
  end
1372
1372
  end
1373
1373
 
1374
- # The long running operation metadata for delete processor method.
1374
+ # The long-running operation metadata for delete processor method.
1375
1375
  class GoogleCloudDocumentaiV1DeleteProcessorMetadata
1376
1376
  include Google::Apis::Core::Hashable
1377
1377
 
@@ -1390,7 +1390,7 @@ module Google
1390
1390
  end
1391
1391
  end
1392
1392
 
1393
- # The long running operation metadata for delete processor version method.
1393
+ # The long-running operation metadata for delete processor version method.
1394
1394
  class GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata
1395
1395
  include Google::Apis::Core::Hashable
1396
1396
 
@@ -1409,7 +1409,7 @@ module Google
1409
1409
  end
1410
1410
  end
1411
1411
 
1412
- # The long running operation metadata for deploy processor version method.
1412
+ # The long-running operation metadata for deploy processor version method.
1413
1413
  class GoogleCloudDocumentaiV1DeployProcessorVersionMetadata
1414
1414
  include Google::Apis::Core::Hashable
1415
1415
 
@@ -1441,7 +1441,7 @@ module Google
1441
1441
  end
1442
1442
  end
1443
1443
 
1444
- # The long running operation metadata for disable processor method.
1444
+ # The long-running operation metadata for disable processor method.
1445
1445
  class GoogleCloudDocumentaiV1DisableProcessorMetadata
1446
1446
  include Google::Apis::Core::Hashable
1447
1447
 
@@ -1474,7 +1474,7 @@ module Google
1474
1474
  end
1475
1475
  end
1476
1476
 
1477
- # The long running operation metadata for enable processor method.
1477
+ # The long-running operation metadata for enable processor method.
1478
1478
  class GoogleCloudDocumentaiV1EnableProcessorMetadata
1479
1479
  include Google::Apis::Core::Hashable
1480
1480
 
@@ -1526,7 +1526,7 @@ module Google
1526
1526
  end
1527
1527
  end
1528
1528
 
1529
- # Metadata of the EvaluateProcessorVersion method.
1529
+ # Response of the EvaluateProcessorVersion method.
1530
1530
  class GoogleCloudDocumentaiV1EvaluateProcessorVersionResponse
1531
1531
  include Google::Apis::Core::Hashable
1532
1532
 
@@ -1550,9 +1550,9 @@ module Google
1550
1550
  include Google::Apis::Core::Hashable
1551
1551
 
1552
1552
  # The name of the operation triggered by the processed document. This field is
1553
- # populated only when the [state] is [HUMAN_REVIEW_IN_PROGRESS]. It has the same
1554
- # response type and metadata as the long running operation returned by [
1555
- # ReviewDocument] method.
1553
+ # populated only when the state is `HUMAN_REVIEW_IN_PROGRESS`. It has the same
1554
+ # response type and metadata as the long-running operation returned by
1555
+ # ReviewDocument.
1556
1556
  # Corresponds to the JSON property `humanReviewOperation`
1557
1557
  # @return [String]
1558
1558
  attr_accessor :human_review_operation
@@ -1579,7 +1579,7 @@ module Google
1579
1579
  end
1580
1580
  end
1581
1581
 
1582
- # The long running operation metadata for review document method.
1582
+ # The long-running operation metadata for review document method.
1583
1583
  class GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata
1584
1584
  include Google::Apis::Core::Hashable
1585
1585
 
@@ -1636,7 +1636,7 @@ module Google
1636
1636
  end
1637
1637
  end
1638
1638
 
1639
- # The long running operation metadata for set default processor version method.
1639
+ # The long-running operation metadata for set default processor version method.
1640
1640
  class GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata
1641
1641
  include Google::Apis::Core::Hashable
1642
1642
 
@@ -1742,7 +1742,7 @@ module Google
1742
1742
  end
1743
1743
  end
1744
1744
 
1745
- # The response for the TrainProcessorVersion method.
1745
+ # The response for TrainProcessorVersion.
1746
1746
  class GoogleCloudDocumentaiV1TrainProcessorVersionResponse
1747
1747
  include Google::Apis::Core::Hashable
1748
1748
 
@@ -1761,7 +1761,7 @@ module Google
1761
1761
  end
1762
1762
  end
1763
1763
 
1764
- # The long running operation metadata for the undeploy processor version method.
1764
+ # The long-running operation metadata for the undeploy processor version method.
1765
1765
  class GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata
1766
1766
  include Google::Apis::Core::Hashable
1767
1767
 
@@ -2962,6 +2962,11 @@ module Google
2962
2962
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
2963
2963
  attr_accessor :provenance
2964
2964
 
2965
+ # Font and other text style attributes.
2966
+ # Corresponds to the JSON property `styleInfo`
2967
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo]
2968
+ attr_accessor :style_info
2969
+
2965
2970
  def initialize(**args)
2966
2971
  update!(**args)
2967
2972
  end
@@ -2972,6 +2977,7 @@ module Google
2972
2977
  @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
2973
2978
  @layout = args[:layout] if args.key?(:layout)
2974
2979
  @provenance = args[:provenance] if args.key?(:provenance)
2980
+ @style_info = args[:style_info] if args.key?(:style_info)
2975
2981
  end
2976
2982
  end
2977
2983
 
@@ -2994,6 +3000,206 @@ module Google
2994
3000
  end
2995
3001
  end
2996
3002
 
3003
+ # Font and other text style attributes.
3004
+ class GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo
3005
+ include Google::Apis::Core::Hashable
3006
+
3007
+ # Represents a color in the RGBA color space. This representation is designed
3008
+ # for simplicity of conversion to/from color representations in various
3009
+ # languages over compactness. For example, the fields of this representation can
3010
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
3011
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
3012
+ # method in iOS; and, with just a little work, it can be easily formatted into a
3013
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
3014
+ # information about the absolute color space that should be used to interpret
3015
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
3016
+ # applications should assume the sRGB color space. When color equality needs to
3017
+ # be decided, implementations, unless documented otherwise, treat two colors as
3018
+ # equal if all their red, green, blue, and alpha values each differ by at most
3019
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
3020
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
3021
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
3022
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
3023
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
3024
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
3025
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
3026
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
3027
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
3028
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
3029
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
3030
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
3031
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
3032
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
3033
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
3034
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
3035
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
3036
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
3037
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
3038
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
3039
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
3040
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3041
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3042
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3043
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3044
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3045
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3046
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
3047
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
3048
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
3049
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
3050
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
3051
+ # / ...
3052
+ # Corresponds to the JSON property `backgroundColor`
3053
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3054
+ attr_accessor :background_color
3055
+
3056
+ # Whether the text is bold (equivalent to font weight >= 700).
3057
+ # Corresponds to the JSON property `bold`
3058
+ # @return [Boolean]
3059
+ attr_accessor :bold
3060
+ alias_method :bold?, :bold
3061
+
3062
+ # Font size in points (1 point is 1/72").
3063
+ # Corresponds to the JSON property `fontSize`
3064
+ # @return [Fixnum]
3065
+ attr_accessor :font_size
3066
+
3067
+ # Name or style of the font.
3068
+ # Corresponds to the JSON property `fontType`
3069
+ # @return [String]
3070
+ attr_accessor :font_type
3071
+
3072
+ # TrueType weight on a scale 100 (Thin) to 1000 (Ultra-heavy). Normal is 400,
3073
+ # Bold is 700.
3074
+ # Corresponds to the JSON property `fontWeight`
3075
+ # @return [Fixnum]
3076
+ attr_accessor :font_weight
3077
+
3078
+ # Whether the text is handwritten.
3079
+ # Corresponds to the JSON property `handwritten`
3080
+ # @return [Boolean]
3081
+ attr_accessor :handwritten
3082
+ alias_method :handwritten?, :handwritten
3083
+
3084
+ # Whether the text is italic.
3085
+ # Corresponds to the JSON property `italic`
3086
+ # @return [Boolean]
3087
+ attr_accessor :italic
3088
+ alias_method :italic?, :italic
3089
+
3090
+ # Letter spacing in points.
3091
+ # Corresponds to the JSON property `letterSpacing`
3092
+ # @return [Float]
3093
+ attr_accessor :letter_spacing
3094
+
3095
+ # Font size in pixels, equal to unrounded_fontsize * resolution / 72.0.
3096
+ # Corresponds to the JSON property `pixelFontSize`
3097
+ # @return [Float]
3098
+ attr_accessor :pixel_font_size
3099
+
3100
+ # Whether the text are small caps.
3101
+ # Corresponds to the JSON property `smallcaps`
3102
+ # @return [Boolean]
3103
+ attr_accessor :smallcaps
3104
+ alias_method :smallcaps?, :smallcaps
3105
+
3106
+ # Whether the text is strikethrough.
3107
+ # Corresponds to the JSON property `strikeout`
3108
+ # @return [Boolean]
3109
+ attr_accessor :strikeout
3110
+ alias_method :strikeout?, :strikeout
3111
+
3112
+ # Whether the text is a subscript.
3113
+ # Corresponds to the JSON property `subscript`
3114
+ # @return [Boolean]
3115
+ attr_accessor :subscript
3116
+ alias_method :subscript?, :subscript
3117
+
3118
+ # Whether the text is a superscript.
3119
+ # Corresponds to the JSON property `superscript`
3120
+ # @return [Boolean]
3121
+ attr_accessor :superscript
3122
+ alias_method :superscript?, :superscript
3123
+
3124
+ # Represents a color in the RGBA color space. This representation is designed
3125
+ # for simplicity of conversion to/from color representations in various
3126
+ # languages over compactness. For example, the fields of this representation can
3127
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
3128
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
3129
+ # method in iOS; and, with just a little work, it can be easily formatted into a
3130
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
3131
+ # information about the absolute color space that should be used to interpret
3132
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
3133
+ # applications should assume the sRGB color space. When color equality needs to
3134
+ # be decided, implementations, unless documented otherwise, treat two colors as
3135
+ # equal if all their red, green, blue, and alpha values each differ by at most
3136
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
3137
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
3138
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
3139
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
3140
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
3141
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
3142
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
3143
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
3144
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
3145
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
3146
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
3147
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
3148
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
3149
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
3150
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
3151
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
3152
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
3153
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
3154
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
3155
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
3156
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
3157
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3158
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3159
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3160
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3161
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3162
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3163
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
3164
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
3165
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
3166
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
3167
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
3168
+ # / ...
3169
+ # Corresponds to the JSON property `textColor`
3170
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3171
+ attr_accessor :text_color
3172
+
3173
+ # Whether the text is underlined.
3174
+ # Corresponds to the JSON property `underlined`
3175
+ # @return [Boolean]
3176
+ attr_accessor :underlined
3177
+ alias_method :underlined?, :underlined
3178
+
3179
+ def initialize(**args)
3180
+ update!(**args)
3181
+ end
3182
+
3183
+ # Update properties of this object
3184
+ def update!(**args)
3185
+ @background_color = args[:background_color] if args.key?(:background_color)
3186
+ @bold = args[:bold] if args.key?(:bold)
3187
+ @font_size = args[:font_size] if args.key?(:font_size)
3188
+ @font_type = args[:font_type] if args.key?(:font_type)
3189
+ @font_weight = args[:font_weight] if args.key?(:font_weight)
3190
+ @handwritten = args[:handwritten] if args.key?(:handwritten)
3191
+ @italic = args[:italic] if args.key?(:italic)
3192
+ @letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
3193
+ @pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
3194
+ @smallcaps = args[:smallcaps] if args.key?(:smallcaps)
3195
+ @strikeout = args[:strikeout] if args.key?(:strikeout)
3196
+ @subscript = args[:subscript] if args.key?(:subscript)
3197
+ @superscript = args[:superscript] if args.key?(:superscript)
3198
+ @text_color = args[:text_color] if args.key?(:text_color)
3199
+ @underlined = args[:underlined] if args.key?(:underlined)
3200
+ end
3201
+ end
3202
+
2997
3203
  # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
2998
3204
  class GoogleCloudDocumentaiV1beta1DocumentPageVisualElement
2999
3205
  include Google::Apis::Core::Hashable
@@ -4905,6 +5111,11 @@ module Google
4905
5111
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentProvenance]
4906
5112
  attr_accessor :provenance
4907
5113
 
5114
+ # Font and other text style attributes.
5115
+ # Corresponds to the JSON property `styleInfo`
5116
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo]
5117
+ attr_accessor :style_info
5118
+
4908
5119
  def initialize(**args)
4909
5120
  update!(**args)
4910
5121
  end
@@ -4915,6 +5126,7 @@ module Google
4915
5126
  @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
4916
5127
  @layout = args[:layout] if args.key?(:layout)
4917
5128
  @provenance = args[:provenance] if args.key?(:provenance)
5129
+ @style_info = args[:style_info] if args.key?(:style_info)
4918
5130
  end
4919
5131
  end
4920
5132
 
@@ -4937,6 +5149,206 @@ module Google
4937
5149
  end
4938
5150
  end
4939
5151
 
5152
+ # Font and other text style attributes.
5153
+ class GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo
5154
+ include Google::Apis::Core::Hashable
5155
+
5156
+ # Represents a color in the RGBA color space. This representation is designed
5157
+ # for simplicity of conversion to/from color representations in various
5158
+ # languages over compactness. For example, the fields of this representation can
5159
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
5160
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
5161
+ # method in iOS; and, with just a little work, it can be easily formatted into a
5162
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
5163
+ # information about the absolute color space that should be used to interpret
5164
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
5165
+ # applications should assume the sRGB color space. When color equality needs to
5166
+ # be decided, implementations, unless documented otherwise, treat two colors as
5167
+ # equal if all their red, green, blue, and alpha values each differ by at most
5168
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
5169
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
5170
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
5171
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
5172
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
5173
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
5174
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
5175
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
5176
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
5177
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
5178
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
5179
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
5180
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
5181
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
5182
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
5183
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
5184
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
5185
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
5186
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
5187
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
5188
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
5189
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
5190
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
5191
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
5192
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
5193
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5194
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
5195
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
5196
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
5197
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
5198
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
5199
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
5200
+ # / ...
5201
+ # Corresponds to the JSON property `backgroundColor`
5202
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
5203
+ attr_accessor :background_color
5204
+
5205
+ # Whether the text is bold (equivalent to font weight >= 700).
5206
+ # Corresponds to the JSON property `bold`
5207
+ # @return [Boolean]
5208
+ attr_accessor :bold
5209
+ alias_method :bold?, :bold
5210
+
5211
+ # Font size in points (1 point is 1/72").
5212
+ # Corresponds to the JSON property `fontSize`
5213
+ # @return [Fixnum]
5214
+ attr_accessor :font_size
5215
+
5216
+ # Name or style of the font.
5217
+ # Corresponds to the JSON property `fontType`
5218
+ # @return [String]
5219
+ attr_accessor :font_type
5220
+
5221
+ # TrueType weight on a scale 100 (Thin) to 1000 (Ultra-heavy). Normal is 400,
5222
+ # Bold is 700.
5223
+ # Corresponds to the JSON property `fontWeight`
5224
+ # @return [Fixnum]
5225
+ attr_accessor :font_weight
5226
+
5227
+ # Whether the text is handwritten.
5228
+ # Corresponds to the JSON property `handwritten`
5229
+ # @return [Boolean]
5230
+ attr_accessor :handwritten
5231
+ alias_method :handwritten?, :handwritten
5232
+
5233
+ # Whether the text is italic.
5234
+ # Corresponds to the JSON property `italic`
5235
+ # @return [Boolean]
5236
+ attr_accessor :italic
5237
+ alias_method :italic?, :italic
5238
+
5239
+ # Letter spacing in points.
5240
+ # Corresponds to the JSON property `letterSpacing`
5241
+ # @return [Float]
5242
+ attr_accessor :letter_spacing
5243
+
5244
+ # Font size in pixels, equal to unrounded_fontsize * resolution / 72.0.
5245
+ # Corresponds to the JSON property `pixelFontSize`
5246
+ # @return [Float]
5247
+ attr_accessor :pixel_font_size
5248
+
5249
+ # Whether the text are small caps.
5250
+ # Corresponds to the JSON property `smallcaps`
5251
+ # @return [Boolean]
5252
+ attr_accessor :smallcaps
5253
+ alias_method :smallcaps?, :smallcaps
5254
+
5255
+ # Whether the text is strikethrough.
5256
+ # Corresponds to the JSON property `strikeout`
5257
+ # @return [Boolean]
5258
+ attr_accessor :strikeout
5259
+ alias_method :strikeout?, :strikeout
5260
+
5261
+ # Whether the text is a subscript.
5262
+ # Corresponds to the JSON property `subscript`
5263
+ # @return [Boolean]
5264
+ attr_accessor :subscript
5265
+ alias_method :subscript?, :subscript
5266
+
5267
+ # Whether the text is a superscript.
5268
+ # Corresponds to the JSON property `superscript`
5269
+ # @return [Boolean]
5270
+ attr_accessor :superscript
5271
+ alias_method :superscript?, :superscript
5272
+
5273
+ # Represents a color in the RGBA color space. This representation is designed
5274
+ # for simplicity of conversion to/from color representations in various
5275
+ # languages over compactness. For example, the fields of this representation can
5276
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
5277
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
5278
+ # method in iOS; and, with just a little work, it can be easily formatted into a
5279
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
5280
+ # information about the absolute color space that should be used to interpret
5281
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
5282
+ # applications should assume the sRGB color space. When color equality needs to
5283
+ # be decided, implementations, unless documented otherwise, treat two colors as
5284
+ # equal if all their red, green, blue, and alpha values each differ by at most
5285
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
5286
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
5287
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
5288
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
5289
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
5290
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
5291
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
5292
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
5293
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
5294
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
5295
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
5296
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
5297
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
5298
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
5299
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
5300
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
5301
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
5302
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
5303
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
5304
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
5305
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
5306
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
5307
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
5308
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
5309
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
5310
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5311
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
5312
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
5313
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
5314
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
5315
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
5316
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
5317
+ # / ...
5318
+ # Corresponds to the JSON property `textColor`
5319
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
5320
+ attr_accessor :text_color
5321
+
5322
+ # Whether the text is underlined.
5323
+ # Corresponds to the JSON property `underlined`
5324
+ # @return [Boolean]
5325
+ attr_accessor :underlined
5326
+ alias_method :underlined?, :underlined
5327
+
5328
+ def initialize(**args)
5329
+ update!(**args)
5330
+ end
5331
+
5332
+ # Update properties of this object
5333
+ def update!(**args)
5334
+ @background_color = args[:background_color] if args.key?(:background_color)
5335
+ @bold = args[:bold] if args.key?(:bold)
5336
+ @font_size = args[:font_size] if args.key?(:font_size)
5337
+ @font_type = args[:font_type] if args.key?(:font_type)
5338
+ @font_weight = args[:font_weight] if args.key?(:font_weight)
5339
+ @handwritten = args[:handwritten] if args.key?(:handwritten)
5340
+ @italic = args[:italic] if args.key?(:italic)
5341
+ @letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
5342
+ @pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
5343
+ @smallcaps = args[:smallcaps] if args.key?(:smallcaps)
5344
+ @strikeout = args[:strikeout] if args.key?(:strikeout)
5345
+ @subscript = args[:subscript] if args.key?(:subscript)
5346
+ @superscript = args[:superscript] if args.key?(:superscript)
5347
+ @text_color = args[:text_color] if args.key?(:text_color)
5348
+ @underlined = args[:underlined] if args.key?(:underlined)
5349
+ end
5350
+ end
5351
+
4940
5352
  # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
4941
5353
  class GoogleCloudDocumentaiV1beta2DocumentPageVisualElement
4942
5354
  include Google::Apis::Core::Hashable
@@ -5713,7 +6125,7 @@ module Google
5713
6125
  end
5714
6126
  end
5715
6127
 
5716
- # The long running operation metadata for batch process method.
6128
+ # The long-running operation metadata for BatchProcessDocuments.
5717
6129
  class GoogleCloudDocumentaiV1beta3BatchProcessMetadata
5718
6130
  include Google::Apis::Core::Hashable
5719
6131
 
@@ -5762,8 +6174,8 @@ module Google
5762
6174
  include Google::Apis::Core::Hashable
5763
6175
 
5764
6176
  # The name of the operation triggered by the processed document. If the human
5765
- # review process is not triggered, this field will be empty. It has the same
5766
- # response type and metadata as the long running operation returned by
6177
+ # review process isn't triggered, this field will be empty. It has the same
6178
+ # response type and metadata as the long-running operation returned by
5767
6179
  # ReviewDocument method.
5768
6180
  # Corresponds to the JSON property `humanReviewOperation`
5769
6181
  # @return [String]
@@ -5812,7 +6224,7 @@ module Google
5812
6224
  end
5813
6225
  end
5814
6226
 
5815
- # Request message for batch process document method.
6227
+ # Request message for BatchProcessDocuments.
5816
6228
  class GoogleCloudDocumentaiV1beta3BatchProcessRequest
5817
6229
  include Google::Apis::Core::Hashable
5818
6230
 
@@ -5874,7 +6286,7 @@ module Google
5874
6286
  attr_accessor :gcs_source
5875
6287
 
5876
6288
  # Mimetype of the input. If the input is a raw document, the supported mimetypes
5877
- # are application/pdf, image/tiff, and image/gif. If the input is a [Document]
6289
+ # are application/pdf, image/tiff, and image/gif. If the input is a Document
5878
6290
  # proto, the type should be application/json.
5879
6291
  # Corresponds to the JSON property `mimeType`
5880
6292
  # @return [String]
@@ -5910,7 +6322,7 @@ module Google
5910
6322
  end
5911
6323
  end
5912
6324
 
5913
- # Response message for batch process document method.
6325
+ # Response message for BatchProcessDocuments.
5914
6326
  class GoogleCloudDocumentaiV1beta3BatchProcessResponse
5915
6327
  include Google::Apis::Core::Hashable
5916
6328
 
@@ -5991,7 +6403,7 @@ module Google
5991
6403
  end
5992
6404
  end
5993
6405
 
5994
- # The long running operation metadata for delete processor method.
6406
+ # The long-running operation metadata for delete processor method.
5995
6407
  class GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata
5996
6408
  include Google::Apis::Core::Hashable
5997
6409
 
@@ -6010,7 +6422,7 @@ module Google
6010
6422
  end
6011
6423
  end
6012
6424
 
6013
- # The long running operation metadata for delete processor version method.
6425
+ # The long-running operation metadata for delete processor version method.
6014
6426
  class GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata
6015
6427
  include Google::Apis::Core::Hashable
6016
6428
 
@@ -6029,7 +6441,7 @@ module Google
6029
6441
  end
6030
6442
  end
6031
6443
 
6032
- # The long running operation metadata for deploy processor version method.
6444
+ # The long-running operation metadata for deploy processor version method.
6033
6445
  class GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata
6034
6446
  include Google::Apis::Core::Hashable
6035
6447
 
@@ -6074,7 +6486,7 @@ module Google
6074
6486
  end
6075
6487
  end
6076
6488
 
6077
- # The long running operation metadata for disable processor method.
6489
+ # The long-running operation metadata for disable processor method.
6078
6490
  class GoogleCloudDocumentaiV1beta3DisableProcessorMetadata
6079
6491
  include Google::Apis::Core::Hashable
6080
6492
 
@@ -7280,6 +7692,11 @@ module Google
7280
7692
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentProvenance]
7281
7693
  attr_accessor :provenance
7282
7694
 
7695
+ # Font and other text style attributes.
7696
+ # Corresponds to the JSON property `styleInfo`
7697
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentPageTokenStyleInfo]
7698
+ attr_accessor :style_info
7699
+
7283
7700
  def initialize(**args)
7284
7701
  update!(**args)
7285
7702
  end
@@ -7290,6 +7707,7 @@ module Google
7290
7707
  @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
7291
7708
  @layout = args[:layout] if args.key?(:layout)
7292
7709
  @provenance = args[:provenance] if args.key?(:provenance)
7710
+ @style_info = args[:style_info] if args.key?(:style_info)
7293
7711
  end
7294
7712
  end
7295
7713
 
@@ -7312,6 +7730,206 @@ module Google
7312
7730
  end
7313
7731
  end
7314
7732
 
7733
+ # Font and other text style attributes.
7734
+ class GoogleCloudDocumentaiV1beta3DocumentPageTokenStyleInfo
7735
+ include Google::Apis::Core::Hashable
7736
+
7737
+ # Represents a color in the RGBA color space. This representation is designed
7738
+ # for simplicity of conversion to/from color representations in various
7739
+ # languages over compactness. For example, the fields of this representation can
7740
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
7741
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
7742
+ # method in iOS; and, with just a little work, it can be easily formatted into a
7743
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
7744
+ # information about the absolute color space that should be used to interpret
7745
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
7746
+ # applications should assume the sRGB color space. When color equality needs to
7747
+ # be decided, implementations, unless documented otherwise, treat two colors as
7748
+ # equal if all their red, green, blue, and alpha values each differ by at most
7749
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
7750
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
7751
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
7752
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
7753
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
7754
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
7755
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
7756
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
7757
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
7758
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
7759
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
7760
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
7761
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
7762
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
7763
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
7764
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
7765
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
7766
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
7767
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
7768
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
7769
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
7770
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
7771
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
7772
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
7773
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
7774
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
7775
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
7776
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
7777
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
7778
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
7779
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
7780
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
7781
+ # / ...
7782
+ # Corresponds to the JSON property `backgroundColor`
7783
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
7784
+ attr_accessor :background_color
7785
+
7786
+ # Whether the text is bold (equivalent to font weight >= 700).
7787
+ # Corresponds to the JSON property `bold`
7788
+ # @return [Boolean]
7789
+ attr_accessor :bold
7790
+ alias_method :bold?, :bold
7791
+
7792
+ # Font size in points (1 point is 1/72").
7793
+ # Corresponds to the JSON property `fontSize`
7794
+ # @return [Fixnum]
7795
+ attr_accessor :font_size
7796
+
7797
+ # Name or style of the font.
7798
+ # Corresponds to the JSON property `fontType`
7799
+ # @return [String]
7800
+ attr_accessor :font_type
7801
+
7802
+ # TrueType weight on a scale 100 (Thin) to 1000 (Ultra-heavy). Normal is 400,
7803
+ # Bold is 700.
7804
+ # Corresponds to the JSON property `fontWeight`
7805
+ # @return [Fixnum]
7806
+ attr_accessor :font_weight
7807
+
7808
+ # Whether the text is handwritten.
7809
+ # Corresponds to the JSON property `handwritten`
7810
+ # @return [Boolean]
7811
+ attr_accessor :handwritten
7812
+ alias_method :handwritten?, :handwritten
7813
+
7814
+ # Whether the text is italic.
7815
+ # Corresponds to the JSON property `italic`
7816
+ # @return [Boolean]
7817
+ attr_accessor :italic
7818
+ alias_method :italic?, :italic
7819
+
7820
+ # Letter spacing in points.
7821
+ # Corresponds to the JSON property `letterSpacing`
7822
+ # @return [Float]
7823
+ attr_accessor :letter_spacing
7824
+
7825
+ # Font size in pixels, equal to unrounded_fontsize * resolution / 72.0.
7826
+ # Corresponds to the JSON property `pixelFontSize`
7827
+ # @return [Float]
7828
+ attr_accessor :pixel_font_size
7829
+
7830
+ # Whether the text are small caps.
7831
+ # Corresponds to the JSON property `smallcaps`
7832
+ # @return [Boolean]
7833
+ attr_accessor :smallcaps
7834
+ alias_method :smallcaps?, :smallcaps
7835
+
7836
+ # Whether the text is strikethrough.
7837
+ # Corresponds to the JSON property `strikeout`
7838
+ # @return [Boolean]
7839
+ attr_accessor :strikeout
7840
+ alias_method :strikeout?, :strikeout
7841
+
7842
+ # Whether the text is a subscript.
7843
+ # Corresponds to the JSON property `subscript`
7844
+ # @return [Boolean]
7845
+ attr_accessor :subscript
7846
+ alias_method :subscript?, :subscript
7847
+
7848
+ # Whether the text is a superscript.
7849
+ # Corresponds to the JSON property `superscript`
7850
+ # @return [Boolean]
7851
+ attr_accessor :superscript
7852
+ alias_method :superscript?, :superscript
7853
+
7854
+ # Represents a color in the RGBA color space. This representation is designed
7855
+ # for simplicity of conversion to/from color representations in various
7856
+ # languages over compactness. For example, the fields of this representation can
7857
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
7858
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
7859
+ # method in iOS; and, with just a little work, it can be easily formatted into a
7860
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
7861
+ # information about the absolute color space that should be used to interpret
7862
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
7863
+ # applications should assume the sRGB color space. When color equality needs to
7864
+ # be decided, implementations, unless documented otherwise, treat two colors as
7865
+ # equal if all their red, green, blue, and alpha values each differ by at most
7866
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
7867
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
7868
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
7869
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
7870
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
7871
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
7872
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
7873
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
7874
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
7875
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
7876
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
7877
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
7878
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
7879
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
7880
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
7881
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
7882
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
7883
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
7884
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
7885
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
7886
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
7887
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
7888
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
7889
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
7890
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
7891
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
7892
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
7893
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
7894
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
7895
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
7896
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
7897
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
7898
+ # / ...
7899
+ # Corresponds to the JSON property `textColor`
7900
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
7901
+ attr_accessor :text_color
7902
+
7903
+ # Whether the text is underlined.
7904
+ # Corresponds to the JSON property `underlined`
7905
+ # @return [Boolean]
7906
+ attr_accessor :underlined
7907
+ alias_method :underlined?, :underlined
7908
+
7909
+ def initialize(**args)
7910
+ update!(**args)
7911
+ end
7912
+
7913
+ # Update properties of this object
7914
+ def update!(**args)
7915
+ @background_color = args[:background_color] if args.key?(:background_color)
7916
+ @bold = args[:bold] if args.key?(:bold)
7917
+ @font_size = args[:font_size] if args.key?(:font_size)
7918
+ @font_type = args[:font_type] if args.key?(:font_type)
7919
+ @font_weight = args[:font_weight] if args.key?(:font_weight)
7920
+ @handwritten = args[:handwritten] if args.key?(:handwritten)
7921
+ @italic = args[:italic] if args.key?(:italic)
7922
+ @letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
7923
+ @pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
7924
+ @smallcaps = args[:smallcaps] if args.key?(:smallcaps)
7925
+ @strikeout = args[:strikeout] if args.key?(:strikeout)
7926
+ @subscript = args[:subscript] if args.key?(:subscript)
7927
+ @superscript = args[:superscript] if args.key?(:superscript)
7928
+ @text_color = args[:text_color] if args.key?(:text_color)
7929
+ @underlined = args[:underlined] if args.key?(:underlined)
7930
+ end
7931
+ end
7932
+
7315
7933
  # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
7316
7934
  class GoogleCloudDocumentaiV1beta3DocumentPageVisualElement
7317
7935
  include Google::Apis::Core::Hashable
@@ -7985,7 +8603,7 @@ module Google
7985
8603
  end
7986
8604
  end
7987
8605
 
7988
- # The long running operation metadata for enable processor method.
8606
+ # The long-running operation metadata for enable processor method.
7989
8607
  class GoogleCloudDocumentaiV1beta3EnableProcessorMetadata
7990
8608
  include Google::Apis::Core::Hashable
7991
8609
 
@@ -8069,7 +8687,7 @@ module Google
8069
8687
  end
8070
8688
  end
8071
8689
 
8072
- # Metadata of the EvaluateProcessorVersion method.
8690
+ # Response of the EvaluateProcessorVersion method.
8073
8691
  class GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse
8074
8692
  include Google::Apis::Core::Hashable
8075
8693
 
@@ -8470,9 +9088,9 @@ module Google
8470
9088
  include Google::Apis::Core::Hashable
8471
9089
 
8472
9090
  # The name of the operation triggered by the processed document. This field is
8473
- # populated only when the [state] is [HUMAN_REVIEW_IN_PROGRESS]. It has the same
8474
- # response type and metadata as the long running operation returned by [
8475
- # ReviewDocument] method.
9091
+ # populated only when the state is `HUMAN_REVIEW_IN_PROGRESS`. It has the same
9092
+ # response type and metadata as the long-running operation returned by
9093
+ # ReviewDocument.
8476
9094
  # Corresponds to the JSON property `humanReviewOperation`
8477
9095
  # @return [String]
8478
9096
  attr_accessor :human_review_operation
@@ -8499,7 +9117,7 @@ module Google
8499
9117
  end
8500
9118
  end
8501
9119
 
8502
- # The long running operation metadata for the ImportProcessorVersion method.
9120
+ # The long-running operation metadata for the ImportProcessorVersion method.
8503
9121
  class GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata
8504
9122
  include Google::Apis::Core::Hashable
8505
9123
 
@@ -8518,14 +9136,14 @@ module Google
8518
9136
  end
8519
9137
  end
8520
9138
 
8521
- # The request message for the ImportProcessorVersion method. This method
8522
- # requires source processor version and destination processor are in the same
8523
- # location. This method requires Document AI Service Agent of the destination
8524
- # project in the source project's IAM with [Document AI Editor role](https://
8525
- # cloud.google.com/document-ai/docs/access-control/iam-roles). The destination
8526
- # project is specified as part of the `parent` field. The source project is
8527
- # specified as part of `source` field. The Service Agent for Document AI can be
8528
- # found in https://cloud.google.com/iam/docs/service-agents.
9139
+ # The request message for the `ImportProcessorVersion` method. This method
9140
+ # requires the source processor version and destination processor to be in the
9141
+ # same location. This method requires the Document AI Service Agent of the
9142
+ # destination project to have [Document AI Editor role](https://cloud.google.com/
9143
+ # document-ai/docs/access-control/iam-roles) on the source project. The
9144
+ # destination project is specified as part of the `parent` field. The source
9145
+ # project is specified as part of `source` field. The Service Agent for Document
9146
+ # AI can be found in https://cloud.google.com/iam/docs/service-agents.
8529
9147
  class GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest
8530
9148
  include Google::Apis::Core::Hashable
8531
9149
 
@@ -8563,7 +9181,7 @@ module Google
8563
9181
  end
8564
9182
  end
8565
9183
 
8566
- # The response from ListEvaluations.
9184
+ # The response from `ListEvaluations`.
8567
9185
  class GoogleCloudDocumentaiV1beta3ListEvaluationsResponse
8568
9186
  include Google::Apis::Core::Hashable
8569
9187
 
@@ -8703,6 +9321,12 @@ module Google
8703
9321
  # @return [Array<String>]
8704
9322
  attr_accessor :advanced_ocr_options
8705
9323
 
9324
+ # Turn on font id model and returns font style information.
9325
+ # Corresponds to the JSON property `computeStyleInfo`
9326
+ # @return [Boolean]
9327
+ attr_accessor :compute_style_info
9328
+ alias_method :compute_style_info?, :compute_style_info
9329
+
8706
9330
  # Enables intelligent document quality scores after OCR. Can help with
8707
9331
  # diagnosing why OCR responses are of poor quality for a given input. Adds
8708
9332
  # additional latency comparable to regular OCR to the process call.
@@ -8736,6 +9360,7 @@ module Google
8736
9360
  # Update properties of this object
8737
9361
  def update!(**args)
8738
9362
  @advanced_ocr_options = args[:advanced_ocr_options] if args.key?(:advanced_ocr_options)
9363
+ @compute_style_info = args[:compute_style_info] if args.key?(:compute_style_info)
8739
9364
  @enable_image_quality_scores = args[:enable_image_quality_scores] if args.key?(:enable_image_quality_scores)
8740
9365
  @enable_native_pdf_parsing = args[:enable_native_pdf_parsing] if args.key?(:enable_native_pdf_parsing)
8741
9366
  @enable_symbol = args[:enable_symbol] if args.key?(:enable_symbol)
@@ -8798,8 +9423,8 @@ module Google
8798
9423
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Document]
8799
9424
  attr_accessor :document
8800
9425
 
8801
- # Specifies which fields to include in ProcessResponse's document. Only supports
8802
- # top level document and pages field so it must be in the form of ``
9426
+ # Specifies which fields to include in the `ProcessResponse` Document. Only
9427
+ # supports top level document and pages field so it must be in the form of ``
8803
9428
  # document_field_name`` or `pages.`page_field_name``.
8804
9429
  # Corresponds to the JSON property `fieldMask`
8805
9430
  # @return [String]
@@ -8858,9 +9483,8 @@ module Google
8858
9483
  attr_accessor :document
8859
9484
 
8860
9485
  # The name of the operation triggered by the processed document. If the human
8861
- # review process is not triggered, this field will be empty. It has the same
8862
- # response type and metadata as the long running operation returned by
8863
- # ReviewDocument method.
9486
+ # review process isn't triggered, this field is empty. It has the same response
9487
+ # type and metadata as the long-running operation returned by ReviewDocument.
8864
9488
  # Corresponds to the JSON property `humanReviewOperation`
8865
9489
  # @return [String]
8866
9490
  attr_accessor :human_review_operation
@@ -8925,8 +9549,8 @@ module Google
8925
9549
  # @return [String]
8926
9550
  attr_accessor :state
8927
9551
 
8928
- # The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. To get a
8929
- # list of processors types, see FetchProcessorTypes.
9552
+ # The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. To get a
9553
+ # list of processor types, see FetchProcessorTypes.
8930
9554
  # Corresponds to the JSON property `type`
8931
9555
  # @return [String]
8932
9556
  attr_accessor :type
@@ -8986,7 +9610,7 @@ module Google
8986
9610
  # @return [Array<String>]
8987
9611
  attr_accessor :sample_document_uris
8988
9612
 
8989
- # The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
9613
+ # The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`.
8990
9614
  # Corresponds to the JSON property `type`
8991
9615
  # @return [String]
8992
9616
  attr_accessor :type
@@ -9157,7 +9781,7 @@ module Google
9157
9781
  end
9158
9782
  end
9159
9783
 
9160
- # The long running operation metadata for review document method.
9784
+ # The long-running operation metadata for review document method.
9161
9785
  class GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata
9162
9786
  include Google::Apis::Core::Hashable
9163
9787
 
@@ -9289,7 +9913,7 @@ module Google
9289
9913
  end
9290
9914
  end
9291
9915
 
9292
- # The long running operation metadata for set default processor version method.
9916
+ # The long-running operation metadata for set default processor version method.
9293
9917
  class GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata
9294
9918
  include Google::Apis::Core::Hashable
9295
9919
 
@@ -9484,7 +10108,7 @@ module Google
9484
10108
  end
9485
10109
  end
9486
10110
 
9487
- # The response for the TrainProcessorVersion method.
10111
+ # The response for TrainProcessorVersion.
9488
10112
  class GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse
9489
10113
  include Google::Apis::Core::Hashable
9490
10114
 
@@ -9503,7 +10127,7 @@ module Google
9503
10127
  end
9504
10128
  end
9505
10129
 
9506
- # The long running operation metadata for the undeploy processor version method.
10130
+ # The long-running operation metadata for the undeploy processor version method.
9507
10131
  class GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata
9508
10132
  include Google::Apis::Core::Hashable
9509
10133
 
@@ -9599,7 +10223,7 @@ module Google
9599
10223
  end
9600
10224
  end
9601
10225
 
9602
- # A resource that represents Google Cloud Platform location.
10226
+ # A resource that represents a Google Cloud location.
9603
10227
  class GoogleCloudLocationLocation
9604
10228
  include Google::Apis::Core::Hashable
9605
10229