google-apis-documentai_v1 0.62.0 → 0.64.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 the CreateLabelerPool method.
|
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 the DeleteProcessor 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 the DeleteProcessorVersion 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 the DeployProcessorVersion method.
|
380
380
|
class GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionMetadata
|
381
381
|
include Google::Apis::Core::Hashable
|
382
382
|
|
@@ -395,7 +395,7 @@ module Google
|
|
395
395
|
end
|
396
396
|
end
|
397
397
|
|
398
|
-
# Response message for the
|
398
|
+
# Response message for the DeployProcessorVersion method.
|
399
399
|
class GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionResponse
|
400
400
|
include Google::Apis::Core::Hashable
|
401
401
|
|
@@ -408,7 +408,7 @@ module Google
|
|
408
408
|
end
|
409
409
|
end
|
410
410
|
|
411
|
-
# The long
|
411
|
+
# The long-running operation metadata for the DisableProcessor method.
|
412
412
|
class GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata
|
413
413
|
include Google::Apis::Core::Hashable
|
414
414
|
|
@@ -427,7 +427,7 @@ module Google
|
|
427
427
|
end
|
428
428
|
end
|
429
429
|
|
430
|
-
# Response message for the
|
430
|
+
# Response message for the DisableProcessor method. Intentionally empty proto
|
431
431
|
# for adding fields in future.
|
432
432
|
class GoogleCloudDocumentaiUiv1beta3DisableProcessorResponse
|
433
433
|
include Google::Apis::Core::Hashable
|
@@ -493,7 +493,7 @@ module Google
|
|
493
493
|
end
|
494
494
|
end
|
495
495
|
|
496
|
-
# The long
|
496
|
+
# The long-running operation metadata for the EnableProcessor method.
|
497
497
|
class GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata
|
498
498
|
include Google::Apis::Core::Hashable
|
499
499
|
|
@@ -512,8 +512,8 @@ module Google
|
|
512
512
|
end
|
513
513
|
end
|
514
514
|
|
515
|
-
# Response message for the
|
516
|
-
#
|
515
|
+
# Response message for the EnableProcessor method. Intentionally empty proto for
|
516
|
+
# adding fields in future.
|
517
517
|
class GoogleCloudDocumentaiUiv1beta3EnableProcessorResponse
|
518
518
|
include Google::Apis::Core::Hashable
|
519
519
|
|
@@ -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,64 @@ module Google
|
|
1010
1010
|
end
|
1011
1011
|
end
|
1012
1012
|
|
1013
|
-
#
|
1013
|
+
# Metadata of the sample documents operation.
|
1014
|
+
class GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata
|
1015
|
+
include Google::Apis::Core::Hashable
|
1016
|
+
|
1017
|
+
# The common metadata for long running operations.
|
1018
|
+
# Corresponds to the JSON property `commonMetadata`
|
1019
|
+
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata]
|
1020
|
+
attr_accessor :common_metadata
|
1021
|
+
|
1022
|
+
def initialize(**args)
|
1023
|
+
update!(**args)
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
# Update properties of this object
|
1027
|
+
def update!(**args)
|
1028
|
+
@common_metadata = args[:common_metadata] if args.key?(:common_metadata)
|
1029
|
+
end
|
1030
|
+
end
|
1031
|
+
|
1032
|
+
# Response of the sample documents operation.
|
1033
|
+
class GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponse
|
1034
|
+
include Google::Apis::Core::Hashable
|
1035
|
+
|
1036
|
+
# The result of the sampling process.
|
1037
|
+
# Corresponds to the JSON property `selectedDocuments`
|
1038
|
+
# @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument>]
|
1039
|
+
attr_accessor :selected_documents
|
1040
|
+
|
1041
|
+
def initialize(**args)
|
1042
|
+
update!(**args)
|
1043
|
+
end
|
1044
|
+
|
1045
|
+
# Update properties of this object
|
1046
|
+
def update!(**args)
|
1047
|
+
@selected_documents = args[:selected_documents] if args.key?(:selected_documents)
|
1048
|
+
end
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
#
|
1052
|
+
class GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument
|
1053
|
+
include Google::Apis::Core::Hashable
|
1054
|
+
|
1055
|
+
# An internal identifier for document.
|
1056
|
+
# Corresponds to the JSON property `documentId`
|
1057
|
+
# @return [String]
|
1058
|
+
attr_accessor :document_id
|
1059
|
+
|
1060
|
+
def initialize(**args)
|
1061
|
+
update!(**args)
|
1062
|
+
end
|
1063
|
+
|
1064
|
+
# Update properties of this object
|
1065
|
+
def update!(**args)
|
1066
|
+
@document_id = args[:document_id] if args.key?(:document_id)
|
1067
|
+
end
|
1068
|
+
end
|
1069
|
+
|
1070
|
+
# The long-running operation metadata for the SetDefaultProcessorVersion method.
|
1014
1071
|
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata
|
1015
1072
|
include Google::Apis::Core::Hashable
|
1016
1073
|
|
@@ -1029,7 +1086,7 @@ module Google
|
|
1029
1086
|
end
|
1030
1087
|
end
|
1031
1088
|
|
1032
|
-
# Response message for
|
1089
|
+
# Response message for the SetDefaultProcessorVersion method.
|
1033
1090
|
class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionResponse
|
1034
1091
|
include Google::Apis::Core::Hashable
|
1035
1092
|
|
@@ -1116,7 +1173,7 @@ module Google
|
|
1116
1173
|
end
|
1117
1174
|
end
|
1118
1175
|
|
1119
|
-
# The response for
|
1176
|
+
# The response for TrainProcessorVersion.
|
1120
1177
|
class GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionResponse
|
1121
1178
|
include Google::Apis::Core::Hashable
|
1122
1179
|
|
@@ -1135,7 +1192,7 @@ module Google
|
|
1135
1192
|
end
|
1136
1193
|
end
|
1137
1194
|
|
1138
|
-
# The long
|
1195
|
+
# The long-running operation metadata for the UndeployProcessorVersion method.
|
1139
1196
|
class GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionMetadata
|
1140
1197
|
include Google::Apis::Core::Hashable
|
1141
1198
|
|
@@ -1154,7 +1211,7 @@ module Google
|
|
1154
1211
|
end
|
1155
1212
|
end
|
1156
1213
|
|
1157
|
-
# Response message for the
|
1214
|
+
# Response message for the UndeployProcessorVersion method.
|
1158
1215
|
class GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionResponse
|
1159
1216
|
include Google::Apis::Core::Hashable
|
1160
1217
|
|
@@ -1186,7 +1243,7 @@ module Google
|
|
1186
1243
|
end
|
1187
1244
|
end
|
1188
1245
|
|
1189
|
-
# The long
|
1246
|
+
# The long-running operation metadata for updating the human review
|
1190
1247
|
# configuration.
|
1191
1248
|
class GoogleCloudDocumentaiUiv1beta3UpdateHumanReviewConfigMetadata
|
1192
1249
|
include Google::Apis::Core::Hashable
|
@@ -1206,7 +1263,7 @@ module Google
|
|
1206
1263
|
end
|
1207
1264
|
end
|
1208
1265
|
|
1209
|
-
# The long
|
1266
|
+
# The long-running operation metadata for UpdateLabelerPool.
|
1210
1267
|
class GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata
|
1211
1268
|
include Google::Apis::Core::Hashable
|
1212
1269
|
|
@@ -1292,7 +1349,7 @@ module Google
|
|
1292
1349
|
end
|
1293
1350
|
end
|
1294
1351
|
|
1295
|
-
# The long
|
1352
|
+
# The long-running operation metadata for BatchProcessDocuments.
|
1296
1353
|
class GoogleCloudDocumentaiV1BatchProcessMetadata
|
1297
1354
|
include Google::Apis::Core::Hashable
|
1298
1355
|
|
@@ -1345,16 +1402,15 @@ module Google
|
|
1345
1402
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1HumanReviewStatus]
|
1346
1403
|
attr_accessor :human_review_status
|
1347
1404
|
|
1348
|
-
# The source of the document, same as the
|
1349
|
-
#
|
1350
|
-
# snapshot of that document, since a user can move or change that document
|
1351
|
-
# during the process.
|
1405
|
+
# The source of the document, same as the input_gcs_source field in the request
|
1406
|
+
# when the batch process started.
|
1352
1407
|
# Corresponds to the JSON property `inputGcsSource`
|
1353
1408
|
# @return [String]
|
1354
1409
|
attr_accessor :input_gcs_source
|
1355
1410
|
|
1356
|
-
# The
|
1357
|
-
# processed document if it was successful,
|
1411
|
+
# The Cloud Storage output destination (in the request as DocumentOutputConfig.
|
1412
|
+
# GcsOutputConfig.gcs_uri) of the processed document if it was successful,
|
1413
|
+
# otherwise empty.
|
1358
1414
|
# Corresponds to the JSON property `outputGcsDestination`
|
1359
1415
|
# @return [String]
|
1360
1416
|
attr_accessor :output_gcs_destination
|
@@ -1382,7 +1438,7 @@ module Google
|
|
1382
1438
|
end
|
1383
1439
|
end
|
1384
1440
|
|
1385
|
-
# Request message for
|
1441
|
+
# Request message for BatchProcessDocuments.
|
1386
1442
|
class GoogleCloudDocumentaiV1BatchProcessRequest
|
1387
1443
|
include Google::Apis::Core::Hashable
|
1388
1444
|
|
@@ -1416,7 +1472,7 @@ module Google
|
|
1416
1472
|
end
|
1417
1473
|
end
|
1418
1474
|
|
1419
|
-
# Response message for
|
1475
|
+
# Response message for BatchProcessDocuments.
|
1420
1476
|
class GoogleCloudDocumentaiV1BatchProcessResponse
|
1421
1477
|
include Google::Apis::Core::Hashable
|
1422
1478
|
|
@@ -1497,7 +1553,7 @@ module Google
|
|
1497
1553
|
end
|
1498
1554
|
end
|
1499
1555
|
|
1500
|
-
# The long
|
1556
|
+
# The long-running operation metadata for the DeleteProcessor method.
|
1501
1557
|
class GoogleCloudDocumentaiV1DeleteProcessorMetadata
|
1502
1558
|
include Google::Apis::Core::Hashable
|
1503
1559
|
|
@@ -1516,7 +1572,7 @@ module Google
|
|
1516
1572
|
end
|
1517
1573
|
end
|
1518
1574
|
|
1519
|
-
# The long
|
1575
|
+
# The long-running operation metadata for the DeleteProcessorVersion method.
|
1520
1576
|
class GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata
|
1521
1577
|
include Google::Apis::Core::Hashable
|
1522
1578
|
|
@@ -1535,7 +1591,7 @@ module Google
|
|
1535
1591
|
end
|
1536
1592
|
end
|
1537
1593
|
|
1538
|
-
# The long
|
1594
|
+
# The long-running operation metadata for the DeployProcessorVersion method.
|
1539
1595
|
class GoogleCloudDocumentaiV1DeployProcessorVersionMetadata
|
1540
1596
|
include Google::Apis::Core::Hashable
|
1541
1597
|
|
@@ -1554,7 +1610,7 @@ module Google
|
|
1554
1610
|
end
|
1555
1611
|
end
|
1556
1612
|
|
1557
|
-
# Request message for the
|
1613
|
+
# Request message for the DeployProcessorVersion method.
|
1558
1614
|
class GoogleCloudDocumentaiV1DeployProcessorVersionRequest
|
1559
1615
|
include Google::Apis::Core::Hashable
|
1560
1616
|
|
@@ -1567,7 +1623,7 @@ module Google
|
|
1567
1623
|
end
|
1568
1624
|
end
|
1569
1625
|
|
1570
|
-
# Response message for the
|
1626
|
+
# Response message for the DeployProcessorVersion method.
|
1571
1627
|
class GoogleCloudDocumentaiV1DeployProcessorVersionResponse
|
1572
1628
|
include Google::Apis::Core::Hashable
|
1573
1629
|
|
@@ -1580,7 +1636,7 @@ module Google
|
|
1580
1636
|
end
|
1581
1637
|
end
|
1582
1638
|
|
1583
|
-
# The long
|
1639
|
+
# The long-running operation metadata for the DisableProcessor method.
|
1584
1640
|
class GoogleCloudDocumentaiV1DisableProcessorMetadata
|
1585
1641
|
include Google::Apis::Core::Hashable
|
1586
1642
|
|
@@ -1599,7 +1655,7 @@ module Google
|
|
1599
1655
|
end
|
1600
1656
|
end
|
1601
1657
|
|
1602
|
-
# Request message for the
|
1658
|
+
# Request message for the DisableProcessor method.
|
1603
1659
|
class GoogleCloudDocumentaiV1DisableProcessorRequest
|
1604
1660
|
include Google::Apis::Core::Hashable
|
1605
1661
|
|
@@ -1612,7 +1668,7 @@ module Google
|
|
1612
1668
|
end
|
1613
1669
|
end
|
1614
1670
|
|
1615
|
-
# Response message for the
|
1671
|
+
# Response message for the DisableProcessor method. Intentionally empty proto
|
1616
1672
|
# for adding fields in future.
|
1617
1673
|
class GoogleCloudDocumentaiV1DisableProcessorResponse
|
1618
1674
|
include Google::Apis::Core::Hashable
|
@@ -1703,9 +1759,9 @@ module Google
|
|
1703
1759
|
attr_accessor :text_styles
|
1704
1760
|
|
1705
1761
|
# Optional. Currently supports Google Cloud Storage URI of the form `gs://
|
1706
|
-
# bucket_name/object_name`. Object versioning is not supported.
|
1707
|
-
# Cloud Storage Request URIs](https://cloud.google.
|
1708
|
-
# uris)
|
1762
|
+
# bucket_name/object_name`. Object versioning is not supported. For more
|
1763
|
+
# information, refer to [Google Cloud Storage Request URIs](https://cloud.google.
|
1764
|
+
# com/storage/docs/reference-uris).
|
1709
1765
|
# Corresponds to the JSON property `uri`
|
1710
1766
|
# @return [String]
|
1711
1767
|
attr_accessor :uri
|
@@ -2786,6 +2842,11 @@ module Google
|
|
2786
2842
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentProvenance]
|
2787
2843
|
attr_accessor :provenance
|
2788
2844
|
|
2845
|
+
# Font and other text style attributes.
|
2846
|
+
# Corresponds to the JSON property `styleInfo`
|
2847
|
+
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo]
|
2848
|
+
attr_accessor :style_info
|
2849
|
+
|
2789
2850
|
def initialize(**args)
|
2790
2851
|
update!(**args)
|
2791
2852
|
end
|
@@ -2796,6 +2857,7 @@ module Google
|
|
2796
2857
|
@detected_languages = args[:detected_languages] if args.key?(:detected_languages)
|
2797
2858
|
@layout = args[:layout] if args.key?(:layout)
|
2798
2859
|
@provenance = args[:provenance] if args.key?(:provenance)
|
2860
|
+
@style_info = args[:style_info] if args.key?(:style_info)
|
2799
2861
|
end
|
2800
2862
|
end
|
2801
2863
|
|
@@ -2818,6 +2880,206 @@ module Google
|
|
2818
2880
|
end
|
2819
2881
|
end
|
2820
2882
|
|
2883
|
+
# Font and other text style attributes.
|
2884
|
+
class GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo
|
2885
|
+
include Google::Apis::Core::Hashable
|
2886
|
+
|
2887
|
+
# Represents a color in the RGBA color space. This representation is designed
|
2888
|
+
# for simplicity of conversion to/from color representations in various
|
2889
|
+
# languages over compactness. For example, the fields of this representation can
|
2890
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
2891
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
2892
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
2893
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
2894
|
+
# information about the absolute color space that should be used to interpret
|
2895
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
2896
|
+
# applications should assume the sRGB color space. When color equality needs to
|
2897
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
2898
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
2899
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
2900
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
2901
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
2902
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
2903
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
2904
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
2905
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
2906
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
2907
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
2908
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
2909
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
2910
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
2911
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
2912
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
2913
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
2914
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
2915
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
2916
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
2917
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
2918
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
2919
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
2920
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
2921
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
2922
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
2923
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
2924
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
2925
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
2926
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
2927
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
2928
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
2929
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
2930
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
2931
|
+
# / ...
|
2932
|
+
# Corresponds to the JSON property `backgroundColor`
|
2933
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
2934
|
+
attr_accessor :background_color
|
2935
|
+
|
2936
|
+
# Whether the text is bold (equivalent to font_weight is at least `700`).
|
2937
|
+
# Corresponds to the JSON property `bold`
|
2938
|
+
# @return [Boolean]
|
2939
|
+
attr_accessor :bold
|
2940
|
+
alias_method :bold?, :bold
|
2941
|
+
|
2942
|
+
# Font size in points (`1` point is `¹⁄₇₂` inches).
|
2943
|
+
# Corresponds to the JSON property `fontSize`
|
2944
|
+
# @return [Fixnum]
|
2945
|
+
attr_accessor :font_size
|
2946
|
+
|
2947
|
+
# Name or style of the font.
|
2948
|
+
# Corresponds to the JSON property `fontType`
|
2949
|
+
# @return [String]
|
2950
|
+
attr_accessor :font_type
|
2951
|
+
|
2952
|
+
# TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `
|
2953
|
+
# 400`, bold is `700`.
|
2954
|
+
# Corresponds to the JSON property `fontWeight`
|
2955
|
+
# @return [Fixnum]
|
2956
|
+
attr_accessor :font_weight
|
2957
|
+
|
2958
|
+
# Whether the text is handwritten.
|
2959
|
+
# Corresponds to the JSON property `handwritten`
|
2960
|
+
# @return [Boolean]
|
2961
|
+
attr_accessor :handwritten
|
2962
|
+
alias_method :handwritten?, :handwritten
|
2963
|
+
|
2964
|
+
# Whether the text is italic.
|
2965
|
+
# Corresponds to the JSON property `italic`
|
2966
|
+
# @return [Boolean]
|
2967
|
+
attr_accessor :italic
|
2968
|
+
alias_method :italic?, :italic
|
2969
|
+
|
2970
|
+
# Letter spacing in points.
|
2971
|
+
# Corresponds to the JSON property `letterSpacing`
|
2972
|
+
# @return [Float]
|
2973
|
+
attr_accessor :letter_spacing
|
2974
|
+
|
2975
|
+
# Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
|
2976
|
+
# Corresponds to the JSON property `pixelFontSize`
|
2977
|
+
# @return [Float]
|
2978
|
+
attr_accessor :pixel_font_size
|
2979
|
+
|
2980
|
+
# Whether the text is in small caps.
|
2981
|
+
# Corresponds to the JSON property `smallcaps`
|
2982
|
+
# @return [Boolean]
|
2983
|
+
attr_accessor :smallcaps
|
2984
|
+
alias_method :smallcaps?, :smallcaps
|
2985
|
+
|
2986
|
+
# Whether the text is strikethrough.
|
2987
|
+
# Corresponds to the JSON property `strikeout`
|
2988
|
+
# @return [Boolean]
|
2989
|
+
attr_accessor :strikeout
|
2990
|
+
alias_method :strikeout?, :strikeout
|
2991
|
+
|
2992
|
+
# Whether the text is a subscript.
|
2993
|
+
# Corresponds to the JSON property `subscript`
|
2994
|
+
# @return [Boolean]
|
2995
|
+
attr_accessor :subscript
|
2996
|
+
alias_method :subscript?, :subscript
|
2997
|
+
|
2998
|
+
# Whether the text is a superscript.
|
2999
|
+
# Corresponds to the JSON property `superscript`
|
3000
|
+
# @return [Boolean]
|
3001
|
+
attr_accessor :superscript
|
3002
|
+
alias_method :superscript?, :superscript
|
3003
|
+
|
3004
|
+
# Represents a color in the RGBA color space. This representation is designed
|
3005
|
+
# for simplicity of conversion to/from color representations in various
|
3006
|
+
# languages over compactness. For example, the fields of this representation can
|
3007
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3008
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3009
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3010
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3011
|
+
# information about the absolute color space that should be used to interpret
|
3012
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3013
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3014
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3015
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3016
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3017
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3018
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3019
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3020
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3021
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3022
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3023
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3024
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3025
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3026
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3027
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3028
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3029
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3030
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3031
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3032
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3033
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3034
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3035
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3036
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3037
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3038
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3039
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3040
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3041
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3042
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3043
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3044
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3045
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3046
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3047
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3048
|
+
# / ...
|
3049
|
+
# Corresponds to the JSON property `textColor`
|
3050
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
3051
|
+
attr_accessor :text_color
|
3052
|
+
|
3053
|
+
# Whether the text is underlined.
|
3054
|
+
# Corresponds to the JSON property `underlined`
|
3055
|
+
# @return [Boolean]
|
3056
|
+
attr_accessor :underlined
|
3057
|
+
alias_method :underlined?, :underlined
|
3058
|
+
|
3059
|
+
def initialize(**args)
|
3060
|
+
update!(**args)
|
3061
|
+
end
|
3062
|
+
|
3063
|
+
# Update properties of this object
|
3064
|
+
def update!(**args)
|
3065
|
+
@background_color = args[:background_color] if args.key?(:background_color)
|
3066
|
+
@bold = args[:bold] if args.key?(:bold)
|
3067
|
+
@font_size = args[:font_size] if args.key?(:font_size)
|
3068
|
+
@font_type = args[:font_type] if args.key?(:font_type)
|
3069
|
+
@font_weight = args[:font_weight] if args.key?(:font_weight)
|
3070
|
+
@handwritten = args[:handwritten] if args.key?(:handwritten)
|
3071
|
+
@italic = args[:italic] if args.key?(:italic)
|
3072
|
+
@letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
|
3073
|
+
@pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
|
3074
|
+
@smallcaps = args[:smallcaps] if args.key?(:smallcaps)
|
3075
|
+
@strikeout = args[:strikeout] if args.key?(:strikeout)
|
3076
|
+
@subscript = args[:subscript] if args.key?(:subscript)
|
3077
|
+
@superscript = args[:superscript] if args.key?(:superscript)
|
3078
|
+
@text_color = args[:text_color] if args.key?(:text_color)
|
3079
|
+
@underlined = args[:underlined] if args.key?(:underlined)
|
3080
|
+
end
|
3081
|
+
end
|
3082
|
+
|
2821
3083
|
# Detected non-text visual elements e.g. checkbox, signature etc. on the page.
|
2822
3084
|
class GoogleCloudDocumentaiV1DocumentPageVisualElement
|
2823
3085
|
include Google::Apis::Core::Hashable
|
@@ -3491,7 +3753,7 @@ module Google
|
|
3491
3753
|
end
|
3492
3754
|
end
|
3493
3755
|
|
3494
|
-
# The long
|
3756
|
+
# The long-running operation metadata for the EnableProcessor method.
|
3495
3757
|
class GoogleCloudDocumentaiV1EnableProcessorMetadata
|
3496
3758
|
include Google::Apis::Core::Hashable
|
3497
3759
|
|
@@ -3510,7 +3772,7 @@ module Google
|
|
3510
3772
|
end
|
3511
3773
|
end
|
3512
3774
|
|
3513
|
-
# Request message for the
|
3775
|
+
# Request message for the EnableProcessor method.
|
3514
3776
|
class GoogleCloudDocumentaiV1EnableProcessorRequest
|
3515
3777
|
include Google::Apis::Core::Hashable
|
3516
3778
|
|
@@ -3523,8 +3785,8 @@ module Google
|
|
3523
3785
|
end
|
3524
3786
|
end
|
3525
3787
|
|
3526
|
-
# Response message for the
|
3527
|
-
#
|
3788
|
+
# Response message for the EnableProcessor method. Intentionally empty proto for
|
3789
|
+
# adding fields in future.
|
3528
3790
|
class GoogleCloudDocumentaiV1EnableProcessorResponse
|
3529
3791
|
include Google::Apis::Core::Hashable
|
3530
3792
|
|
@@ -3575,7 +3837,7 @@ module Google
|
|
3575
3837
|
end
|
3576
3838
|
end
|
3577
3839
|
|
3578
|
-
#
|
3840
|
+
# Response of the EvaluateProcessorVersion method.
|
3579
3841
|
class GoogleCloudDocumentaiV1EvaluateProcessorVersionResponse
|
3580
3842
|
include Google::Apis::Core::Hashable
|
3581
3843
|
|
@@ -3889,7 +4151,7 @@ module Google
|
|
3889
4151
|
end
|
3890
4152
|
end
|
3891
4153
|
|
3892
|
-
# Response message for
|
4154
|
+
# Response message for the FetchProcessorTypes method.
|
3893
4155
|
class GoogleCloudDocumentaiV1FetchProcessorTypesResponse
|
3894
4156
|
include Google::Apis::Core::Hashable
|
3895
4157
|
|
@@ -3976,9 +4238,9 @@ module Google
|
|
3976
4238
|
include Google::Apis::Core::Hashable
|
3977
4239
|
|
3978
4240
|
# 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
|
4241
|
+
# populated only when the state is `HUMAN_REVIEW_IN_PROGRESS`. It has the same
|
4242
|
+
# response type and metadata as the long-running operation returned by
|
4243
|
+
# ReviewDocument.
|
3982
4244
|
# Corresponds to the JSON property `humanReviewOperation`
|
3983
4245
|
# @return [String]
|
3984
4246
|
attr_accessor :human_review_operation
|
@@ -4005,7 +4267,7 @@ module Google
|
|
4005
4267
|
end
|
4006
4268
|
end
|
4007
4269
|
|
4008
|
-
# The response from ListEvaluations
|
4270
|
+
# The response from `ListEvaluations`.
|
4009
4271
|
class GoogleCloudDocumentaiV1ListEvaluationsResponse
|
4010
4272
|
include Google::Apis::Core::Hashable
|
4011
4273
|
|
@@ -4031,7 +4293,7 @@ module Google
|
|
4031
4293
|
end
|
4032
4294
|
end
|
4033
4295
|
|
4034
|
-
# Response message for
|
4296
|
+
# Response message for the ListProcessorTypes method.
|
4035
4297
|
class GoogleCloudDocumentaiV1ListProcessorTypesResponse
|
4036
4298
|
include Google::Apis::Core::Hashable
|
4037
4299
|
|
@@ -4056,7 +4318,7 @@ module Google
|
|
4056
4318
|
end
|
4057
4319
|
end
|
4058
4320
|
|
4059
|
-
# Response message for
|
4321
|
+
# Response message for the ListProcessorVersions method.
|
4060
4322
|
class GoogleCloudDocumentaiV1ListProcessorVersionsResponse
|
4061
4323
|
include Google::Apis::Core::Hashable
|
4062
4324
|
|
@@ -4081,7 +4343,7 @@ module Google
|
|
4081
4343
|
end
|
4082
4344
|
end
|
4083
4345
|
|
4084
|
-
# Response message for
|
4346
|
+
# Response message for the ListProcessors method.
|
4085
4347
|
class GoogleCloudDocumentaiV1ListProcessorsResponse
|
4086
4348
|
include Google::Apis::Core::Hashable
|
4087
4349
|
|
@@ -4132,12 +4394,12 @@ module Google
|
|
4132
4394
|
end
|
4133
4395
|
end
|
4134
4396
|
|
4135
|
-
# Request message for the
|
4397
|
+
# Request message for the ProcessDocument method.
|
4136
4398
|
class GoogleCloudDocumentaiV1ProcessRequest
|
4137
4399
|
include Google::Apis::Core::Hashable
|
4138
4400
|
|
4139
|
-
# Specifies which fields to include in ProcessResponse
|
4140
|
-
# top
|
4401
|
+
# Specifies which fields to include in the ProcessResponse.document output. Only
|
4402
|
+
# supports top-level document and pages field, so it must be in the form of ``
|
4141
4403
|
# document_field_name`` or `pages.`page_field_name``.
|
4142
4404
|
# Corresponds to the JSON property `fieldMask`
|
4143
4405
|
# @return [String]
|
@@ -4176,7 +4438,7 @@ module Google
|
|
4176
4438
|
end
|
4177
4439
|
end
|
4178
4440
|
|
4179
|
-
# Response message for the
|
4441
|
+
# Response message for the ProcessDocument method.
|
4180
4442
|
class GoogleCloudDocumentaiV1ProcessResponse
|
4181
4443
|
include Google::Apis::Core::Hashable
|
4182
4444
|
|
@@ -4247,8 +4509,8 @@ module Google
|
|
4247
4509
|
# @return [String]
|
4248
4510
|
attr_accessor :state
|
4249
4511
|
|
4250
|
-
# The processor type,
|
4251
|
-
# list of
|
4512
|
+
# The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. To get a
|
4513
|
+
# list of processor types, see FetchProcessorTypes.
|
4252
4514
|
# Corresponds to the JSON property `type`
|
4253
4515
|
# @return [String]
|
4254
4516
|
attr_accessor :type
|
@@ -4308,7 +4570,7 @@ module Google
|
|
4308
4570
|
# @return [Array<String>]
|
4309
4571
|
attr_accessor :sample_document_uris
|
4310
4572
|
|
4311
|
-
# The processor type,
|
4573
|
+
# The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`.
|
4312
4574
|
# Corresponds to the JSON property `type`
|
4313
4575
|
# @return [String]
|
4314
4576
|
attr_accessor :type
|
@@ -4479,7 +4741,7 @@ module Google
|
|
4479
4741
|
end
|
4480
4742
|
end
|
4481
4743
|
|
4482
|
-
# The long
|
4744
|
+
# The long-running operation metadata for the ReviewDocument method.
|
4483
4745
|
class GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata
|
4484
4746
|
include Google::Apis::Core::Hashable
|
4485
4747
|
|
@@ -4504,7 +4766,7 @@ module Google
|
|
4504
4766
|
end
|
4505
4767
|
end
|
4506
4768
|
|
4507
|
-
# Request message for
|
4769
|
+
# Request message for the ReviewDocument method.
|
4508
4770
|
class GoogleCloudDocumentaiV1ReviewDocumentRequest
|
4509
4771
|
include Google::Apis::Core::Hashable
|
4510
4772
|
|
@@ -4545,7 +4807,7 @@ module Google
|
|
4545
4807
|
end
|
4546
4808
|
end
|
4547
4809
|
|
4548
|
-
# Response message for
|
4810
|
+
# Response message for the ReviewDocument method.
|
4549
4811
|
class GoogleCloudDocumentaiV1ReviewDocumentResponse
|
4550
4812
|
include Google::Apis::Core::Hashable
|
4551
4813
|
|
@@ -4577,7 +4839,7 @@ module Google
|
|
4577
4839
|
end
|
4578
4840
|
end
|
4579
4841
|
|
4580
|
-
# The long
|
4842
|
+
# The long-running operation metadata for the SetDefaultProcessorVersion method.
|
4581
4843
|
class GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata
|
4582
4844
|
include Google::Apis::Core::Hashable
|
4583
4845
|
|
@@ -4596,7 +4858,7 @@ module Google
|
|
4596
4858
|
end
|
4597
4859
|
end
|
4598
4860
|
|
4599
|
-
# Request message for the
|
4861
|
+
# Request message for the SetDefaultProcessorVersion method.
|
4600
4862
|
class GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest
|
4601
4863
|
include Google::Apis::Core::Hashable
|
4602
4864
|
|
@@ -4617,7 +4879,7 @@ module Google
|
|
4617
4879
|
end
|
4618
4880
|
end
|
4619
4881
|
|
4620
|
-
# Response message for
|
4882
|
+
# Response message for the SetDefaultProcessorVersion method.
|
4621
4883
|
class GoogleCloudDocumentaiV1SetDefaultProcessorVersionResponse
|
4622
4884
|
include Google::Apis::Core::Hashable
|
4623
4885
|
|
@@ -4704,7 +4966,7 @@ module Google
|
|
4704
4966
|
end
|
4705
4967
|
end
|
4706
4968
|
|
4707
|
-
# Request message for the
|
4969
|
+
# Request message for the TrainProcessorVersion method.
|
4708
4970
|
class GoogleCloudDocumentaiV1TrainProcessorVersionRequest
|
4709
4971
|
include Google::Apis::Core::Hashable
|
4710
4972
|
|
@@ -4720,7 +4982,7 @@ module Google
|
|
4720
4982
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentSchema]
|
4721
4983
|
attr_accessor :document_schema
|
4722
4984
|
|
4723
|
-
# The input data used to train a new
|
4985
|
+
# The input data used to train a new ProcessorVersion.
|
4724
4986
|
# Corresponds to the JSON property `inputData`
|
4725
4987
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData]
|
4726
4988
|
attr_accessor :input_data
|
@@ -4747,7 +5009,7 @@ module Google
|
|
4747
5009
|
end
|
4748
5010
|
end
|
4749
5011
|
|
4750
|
-
# The input data used to train a new
|
5012
|
+
# The input data used to train a new ProcessorVersion.
|
4751
5013
|
class GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData
|
4752
5014
|
include Google::Apis::Core::Hashable
|
4753
5015
|
|
@@ -4772,7 +5034,7 @@ module Google
|
|
4772
5034
|
end
|
4773
5035
|
end
|
4774
5036
|
|
4775
|
-
# The response for
|
5037
|
+
# The response for TrainProcessorVersion.
|
4776
5038
|
class GoogleCloudDocumentaiV1TrainProcessorVersionResponse
|
4777
5039
|
include Google::Apis::Core::Hashable
|
4778
5040
|
|
@@ -4791,7 +5053,7 @@ module Google
|
|
4791
5053
|
end
|
4792
5054
|
end
|
4793
5055
|
|
4794
|
-
# The long
|
5056
|
+
# The long-running operation metadata for the UndeployProcessorVersion method.
|
4795
5057
|
class GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata
|
4796
5058
|
include Google::Apis::Core::Hashable
|
4797
5059
|
|
@@ -4810,7 +5072,7 @@ module Google
|
|
4810
5072
|
end
|
4811
5073
|
end
|
4812
5074
|
|
4813
|
-
# Request message for the
|
5075
|
+
# Request message for the UndeployProcessorVersion method.
|
4814
5076
|
class GoogleCloudDocumentaiV1UndeployProcessorVersionRequest
|
4815
5077
|
include Google::Apis::Core::Hashable
|
4816
5078
|
|
@@ -4823,7 +5085,7 @@ module Google
|
|
4823
5085
|
end
|
4824
5086
|
end
|
4825
5087
|
|
4826
|
-
# Response message for the
|
5088
|
+
# Response message for the UndeployProcessorVersion method.
|
4827
5089
|
class GoogleCloudDocumentaiV1UndeployProcessorVersionResponse
|
4828
5090
|
include Google::Apis::Core::Hashable
|
4829
5091
|
|
@@ -5026,9 +5288,9 @@ module Google
|
|
5026
5288
|
attr_accessor :text_styles
|
5027
5289
|
|
5028
5290
|
# Optional. Currently supports Google Cloud Storage URI of the form `gs://
|
5029
|
-
# bucket_name/object_name`. Object versioning is not supported.
|
5030
|
-
# Cloud Storage Request URIs](https://cloud.google.
|
5031
|
-
# uris)
|
5291
|
+
# bucket_name/object_name`. Object versioning is not supported. For more
|
5292
|
+
# information, refer to [Google Cloud Storage Request URIs](https://cloud.google.
|
5293
|
+
# com/storage/docs/reference-uris).
|
5032
5294
|
# Corresponds to the JSON property `uri`
|
5033
5295
|
# @return [String]
|
5034
5296
|
attr_accessor :uri
|
@@ -6031,6 +6293,11 @@ module Google
|
|
6031
6293
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta1DocumentProvenance]
|
6032
6294
|
attr_accessor :provenance
|
6033
6295
|
|
6296
|
+
# Font and other text style attributes.
|
6297
|
+
# Corresponds to the JSON property `styleInfo`
|
6298
|
+
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo]
|
6299
|
+
attr_accessor :style_info
|
6300
|
+
|
6034
6301
|
def initialize(**args)
|
6035
6302
|
update!(**args)
|
6036
6303
|
end
|
@@ -6041,6 +6308,7 @@ module Google
|
|
6041
6308
|
@detected_languages = args[:detected_languages] if args.key?(:detected_languages)
|
6042
6309
|
@layout = args[:layout] if args.key?(:layout)
|
6043
6310
|
@provenance = args[:provenance] if args.key?(:provenance)
|
6311
|
+
@style_info = args[:style_info] if args.key?(:style_info)
|
6044
6312
|
end
|
6045
6313
|
end
|
6046
6314
|
|
@@ -6063,6 +6331,206 @@ module Google
|
|
6063
6331
|
end
|
6064
6332
|
end
|
6065
6333
|
|
6334
|
+
# Font and other text style attributes.
|
6335
|
+
class GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo
|
6336
|
+
include Google::Apis::Core::Hashable
|
6337
|
+
|
6338
|
+
# Represents a color in the RGBA color space. This representation is designed
|
6339
|
+
# for simplicity of conversion to/from color representations in various
|
6340
|
+
# languages over compactness. For example, the fields of this representation can
|
6341
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6342
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6343
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6344
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6345
|
+
# information about the absolute color space that should be used to interpret
|
6346
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6347
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6348
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6349
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6350
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6351
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6352
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6353
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6354
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6355
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6356
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6357
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6358
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6359
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6360
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6361
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6362
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6363
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6364
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6365
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6366
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6367
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6368
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6369
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6370
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6371
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6372
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6373
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6374
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6375
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6376
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6377
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6378
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6379
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6380
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6381
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6382
|
+
# / ...
|
6383
|
+
# Corresponds to the JSON property `backgroundColor`
|
6384
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
6385
|
+
attr_accessor :background_color
|
6386
|
+
|
6387
|
+
# Whether the text is bold (equivalent to font_weight is at least `700`).
|
6388
|
+
# Corresponds to the JSON property `bold`
|
6389
|
+
# @return [Boolean]
|
6390
|
+
attr_accessor :bold
|
6391
|
+
alias_method :bold?, :bold
|
6392
|
+
|
6393
|
+
# Font size in points (`1` point is `¹⁄₇₂` inches).
|
6394
|
+
# Corresponds to the JSON property `fontSize`
|
6395
|
+
# @return [Fixnum]
|
6396
|
+
attr_accessor :font_size
|
6397
|
+
|
6398
|
+
# Name or style of the font.
|
6399
|
+
# Corresponds to the JSON property `fontType`
|
6400
|
+
# @return [String]
|
6401
|
+
attr_accessor :font_type
|
6402
|
+
|
6403
|
+
# TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `
|
6404
|
+
# 400`, bold is `700`.
|
6405
|
+
# Corresponds to the JSON property `fontWeight`
|
6406
|
+
# @return [Fixnum]
|
6407
|
+
attr_accessor :font_weight
|
6408
|
+
|
6409
|
+
# Whether the text is handwritten.
|
6410
|
+
# Corresponds to the JSON property `handwritten`
|
6411
|
+
# @return [Boolean]
|
6412
|
+
attr_accessor :handwritten
|
6413
|
+
alias_method :handwritten?, :handwritten
|
6414
|
+
|
6415
|
+
# Whether the text is italic.
|
6416
|
+
# Corresponds to the JSON property `italic`
|
6417
|
+
# @return [Boolean]
|
6418
|
+
attr_accessor :italic
|
6419
|
+
alias_method :italic?, :italic
|
6420
|
+
|
6421
|
+
# Letter spacing in points.
|
6422
|
+
# Corresponds to the JSON property `letterSpacing`
|
6423
|
+
# @return [Float]
|
6424
|
+
attr_accessor :letter_spacing
|
6425
|
+
|
6426
|
+
# Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
|
6427
|
+
# Corresponds to the JSON property `pixelFontSize`
|
6428
|
+
# @return [Float]
|
6429
|
+
attr_accessor :pixel_font_size
|
6430
|
+
|
6431
|
+
# Whether the text is in small caps.
|
6432
|
+
# Corresponds to the JSON property `smallcaps`
|
6433
|
+
# @return [Boolean]
|
6434
|
+
attr_accessor :smallcaps
|
6435
|
+
alias_method :smallcaps?, :smallcaps
|
6436
|
+
|
6437
|
+
# Whether the text is strikethrough.
|
6438
|
+
# Corresponds to the JSON property `strikeout`
|
6439
|
+
# @return [Boolean]
|
6440
|
+
attr_accessor :strikeout
|
6441
|
+
alias_method :strikeout?, :strikeout
|
6442
|
+
|
6443
|
+
# Whether the text is a subscript.
|
6444
|
+
# Corresponds to the JSON property `subscript`
|
6445
|
+
# @return [Boolean]
|
6446
|
+
attr_accessor :subscript
|
6447
|
+
alias_method :subscript?, :subscript
|
6448
|
+
|
6449
|
+
# Whether the text is a superscript.
|
6450
|
+
# Corresponds to the JSON property `superscript`
|
6451
|
+
# @return [Boolean]
|
6452
|
+
attr_accessor :superscript
|
6453
|
+
alias_method :superscript?, :superscript
|
6454
|
+
|
6455
|
+
# Represents a color in the RGBA color space. This representation is designed
|
6456
|
+
# for simplicity of conversion to/from color representations in various
|
6457
|
+
# languages over compactness. For example, the fields of this representation can
|
6458
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6459
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6460
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6461
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6462
|
+
# information about the absolute color space that should be used to interpret
|
6463
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6464
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6465
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6466
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6467
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6468
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6469
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6470
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6471
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6472
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6473
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6474
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6475
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6476
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6477
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6478
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6479
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6480
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6481
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6482
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6483
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6484
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6485
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6486
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6487
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6488
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6489
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6490
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6491
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6492
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6493
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6494
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6495
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6496
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6497
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6498
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6499
|
+
# / ...
|
6500
|
+
# Corresponds to the JSON property `textColor`
|
6501
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
6502
|
+
attr_accessor :text_color
|
6503
|
+
|
6504
|
+
# Whether the text is underlined.
|
6505
|
+
# Corresponds to the JSON property `underlined`
|
6506
|
+
# @return [Boolean]
|
6507
|
+
attr_accessor :underlined
|
6508
|
+
alias_method :underlined?, :underlined
|
6509
|
+
|
6510
|
+
def initialize(**args)
|
6511
|
+
update!(**args)
|
6512
|
+
end
|
6513
|
+
|
6514
|
+
# Update properties of this object
|
6515
|
+
def update!(**args)
|
6516
|
+
@background_color = args[:background_color] if args.key?(:background_color)
|
6517
|
+
@bold = args[:bold] if args.key?(:bold)
|
6518
|
+
@font_size = args[:font_size] if args.key?(:font_size)
|
6519
|
+
@font_type = args[:font_type] if args.key?(:font_type)
|
6520
|
+
@font_weight = args[:font_weight] if args.key?(:font_weight)
|
6521
|
+
@handwritten = args[:handwritten] if args.key?(:handwritten)
|
6522
|
+
@italic = args[:italic] if args.key?(:italic)
|
6523
|
+
@letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
|
6524
|
+
@pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
|
6525
|
+
@smallcaps = args[:smallcaps] if args.key?(:smallcaps)
|
6526
|
+
@strikeout = args[:strikeout] if args.key?(:strikeout)
|
6527
|
+
@subscript = args[:subscript] if args.key?(:subscript)
|
6528
|
+
@superscript = args[:superscript] if args.key?(:superscript)
|
6529
|
+
@text_color = args[:text_color] if args.key?(:text_color)
|
6530
|
+
@underlined = args[:underlined] if args.key?(:underlined)
|
6531
|
+
end
|
6532
|
+
end
|
6533
|
+
|
6066
6534
|
# Detected non-text visual elements e.g. checkbox, signature etc. on the page.
|
6067
6535
|
class GoogleCloudDocumentaiV1beta1DocumentPageVisualElement
|
6068
6536
|
include Google::Apis::Core::Hashable
|
@@ -6931,9 +7399,9 @@ module Google
|
|
6931
7399
|
attr_accessor :text_styles
|
6932
7400
|
|
6933
7401
|
# Optional. Currently supports Google Cloud Storage URI of the form `gs://
|
6934
|
-
# bucket_name/object_name`. Object versioning is not supported.
|
6935
|
-
# Cloud Storage Request URIs](https://cloud.google.
|
6936
|
-
# uris)
|
7402
|
+
# bucket_name/object_name`. Object versioning is not supported. For more
|
7403
|
+
# information, refer to [Google Cloud Storage Request URIs](https://cloud.google.
|
7404
|
+
# com/storage/docs/reference-uris).
|
6937
7405
|
# Corresponds to the JSON property `uri`
|
6938
7406
|
# @return [String]
|
6939
7407
|
attr_accessor :uri
|
@@ -7974,6 +8442,11 @@ module Google
|
|
7974
8442
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta2DocumentProvenance]
|
7975
8443
|
attr_accessor :provenance
|
7976
8444
|
|
8445
|
+
# Font and other text style attributes.
|
8446
|
+
# Corresponds to the JSON property `styleInfo`
|
8447
|
+
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo]
|
8448
|
+
attr_accessor :style_info
|
8449
|
+
|
7977
8450
|
def initialize(**args)
|
7978
8451
|
update!(**args)
|
7979
8452
|
end
|
@@ -7984,6 +8457,7 @@ module Google
|
|
7984
8457
|
@detected_languages = args[:detected_languages] if args.key?(:detected_languages)
|
7985
8458
|
@layout = args[:layout] if args.key?(:layout)
|
7986
8459
|
@provenance = args[:provenance] if args.key?(:provenance)
|
8460
|
+
@style_info = args[:style_info] if args.key?(:style_info)
|
7987
8461
|
end
|
7988
8462
|
end
|
7989
8463
|
|
@@ -8006,6 +8480,206 @@ module Google
|
|
8006
8480
|
end
|
8007
8481
|
end
|
8008
8482
|
|
8483
|
+
# Font and other text style attributes.
|
8484
|
+
class GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo
|
8485
|
+
include Google::Apis::Core::Hashable
|
8486
|
+
|
8487
|
+
# Represents a color in the RGBA color space. This representation is designed
|
8488
|
+
# for simplicity of conversion to/from color representations in various
|
8489
|
+
# languages over compactness. For example, the fields of this representation can
|
8490
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
8491
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
8492
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
8493
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
8494
|
+
# information about the absolute color space that should be used to interpret
|
8495
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
8496
|
+
# applications should assume the sRGB color space. When color equality needs to
|
8497
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
8498
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
8499
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
8500
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
8501
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
8502
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
8503
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
8504
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
8505
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
8506
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
8507
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
8508
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
8509
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
8510
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
8511
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
8512
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
8513
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
8514
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
8515
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
8516
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
8517
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
8518
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
8519
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
8520
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
8521
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
8522
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
8523
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
8524
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
8525
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
8526
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
8527
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
8528
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
8529
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
8530
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
8531
|
+
# / ...
|
8532
|
+
# Corresponds to the JSON property `backgroundColor`
|
8533
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
8534
|
+
attr_accessor :background_color
|
8535
|
+
|
8536
|
+
# Whether the text is bold (equivalent to font_weight is at least `700`).
|
8537
|
+
# Corresponds to the JSON property `bold`
|
8538
|
+
# @return [Boolean]
|
8539
|
+
attr_accessor :bold
|
8540
|
+
alias_method :bold?, :bold
|
8541
|
+
|
8542
|
+
# Font size in points (`1` point is `¹⁄₇₂` inches).
|
8543
|
+
# Corresponds to the JSON property `fontSize`
|
8544
|
+
# @return [Fixnum]
|
8545
|
+
attr_accessor :font_size
|
8546
|
+
|
8547
|
+
# Name or style of the font.
|
8548
|
+
# Corresponds to the JSON property `fontType`
|
8549
|
+
# @return [String]
|
8550
|
+
attr_accessor :font_type
|
8551
|
+
|
8552
|
+
# TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `
|
8553
|
+
# 400`, bold is `700`.
|
8554
|
+
# Corresponds to the JSON property `fontWeight`
|
8555
|
+
# @return [Fixnum]
|
8556
|
+
attr_accessor :font_weight
|
8557
|
+
|
8558
|
+
# Whether the text is handwritten.
|
8559
|
+
# Corresponds to the JSON property `handwritten`
|
8560
|
+
# @return [Boolean]
|
8561
|
+
attr_accessor :handwritten
|
8562
|
+
alias_method :handwritten?, :handwritten
|
8563
|
+
|
8564
|
+
# Whether the text is italic.
|
8565
|
+
# Corresponds to the JSON property `italic`
|
8566
|
+
# @return [Boolean]
|
8567
|
+
attr_accessor :italic
|
8568
|
+
alias_method :italic?, :italic
|
8569
|
+
|
8570
|
+
# Letter spacing in points.
|
8571
|
+
# Corresponds to the JSON property `letterSpacing`
|
8572
|
+
# @return [Float]
|
8573
|
+
attr_accessor :letter_spacing
|
8574
|
+
|
8575
|
+
# Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
|
8576
|
+
# Corresponds to the JSON property `pixelFontSize`
|
8577
|
+
# @return [Float]
|
8578
|
+
attr_accessor :pixel_font_size
|
8579
|
+
|
8580
|
+
# Whether the text is in small caps.
|
8581
|
+
# Corresponds to the JSON property `smallcaps`
|
8582
|
+
# @return [Boolean]
|
8583
|
+
attr_accessor :smallcaps
|
8584
|
+
alias_method :smallcaps?, :smallcaps
|
8585
|
+
|
8586
|
+
# Whether the text is strikethrough.
|
8587
|
+
# Corresponds to the JSON property `strikeout`
|
8588
|
+
# @return [Boolean]
|
8589
|
+
attr_accessor :strikeout
|
8590
|
+
alias_method :strikeout?, :strikeout
|
8591
|
+
|
8592
|
+
# Whether the text is a subscript.
|
8593
|
+
# Corresponds to the JSON property `subscript`
|
8594
|
+
# @return [Boolean]
|
8595
|
+
attr_accessor :subscript
|
8596
|
+
alias_method :subscript?, :subscript
|
8597
|
+
|
8598
|
+
# Whether the text is a superscript.
|
8599
|
+
# Corresponds to the JSON property `superscript`
|
8600
|
+
# @return [Boolean]
|
8601
|
+
attr_accessor :superscript
|
8602
|
+
alias_method :superscript?, :superscript
|
8603
|
+
|
8604
|
+
# Represents a color in the RGBA color space. This representation is designed
|
8605
|
+
# for simplicity of conversion to/from color representations in various
|
8606
|
+
# languages over compactness. For example, the fields of this representation can
|
8607
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
8608
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
8609
|
+
# method in iOS; and, with just a little work, it can be easily formatted into a
|
8610
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
8611
|
+
# information about the absolute color space that should be used to interpret
|
8612
|
+
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
8613
|
+
# applications should assume the sRGB color space. When color equality needs to
|
8614
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
8615
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
8616
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
8617
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
8618
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
8619
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
8620
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
8621
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
8622
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
8623
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
8624
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
8625
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
8626
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
8627
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
8628
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
8629
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
8630
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
8631
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
8632
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
8633
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
8634
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
8635
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
8636
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
8637
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
8638
|
+
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
8639
|
+
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
8640
|
+
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
8641
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
8642
|
+
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
8643
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
8644
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
8645
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
8646
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
8647
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
8648
|
+
# / ...
|
8649
|
+
# Corresponds to the JSON property `textColor`
|
8650
|
+
# @return [Google::Apis::DocumentaiV1::GoogleTypeColor]
|
8651
|
+
attr_accessor :text_color
|
8652
|
+
|
8653
|
+
# Whether the text is underlined.
|
8654
|
+
# Corresponds to the JSON property `underlined`
|
8655
|
+
# @return [Boolean]
|
8656
|
+
attr_accessor :underlined
|
8657
|
+
alias_method :underlined?, :underlined
|
8658
|
+
|
8659
|
+
def initialize(**args)
|
8660
|
+
update!(**args)
|
8661
|
+
end
|
8662
|
+
|
8663
|
+
# Update properties of this object
|
8664
|
+
def update!(**args)
|
8665
|
+
@background_color = args[:background_color] if args.key?(:background_color)
|
8666
|
+
@bold = args[:bold] if args.key?(:bold)
|
8667
|
+
@font_size = args[:font_size] if args.key?(:font_size)
|
8668
|
+
@font_type = args[:font_type] if args.key?(:font_type)
|
8669
|
+
@font_weight = args[:font_weight] if args.key?(:font_weight)
|
8670
|
+
@handwritten = args[:handwritten] if args.key?(:handwritten)
|
8671
|
+
@italic = args[:italic] if args.key?(:italic)
|
8672
|
+
@letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
|
8673
|
+
@pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
|
8674
|
+
@smallcaps = args[:smallcaps] if args.key?(:smallcaps)
|
8675
|
+
@strikeout = args[:strikeout] if args.key?(:strikeout)
|
8676
|
+
@subscript = args[:subscript] if args.key?(:subscript)
|
8677
|
+
@superscript = args[:superscript] if args.key?(:superscript)
|
8678
|
+
@text_color = args[:text_color] if args.key?(:text_color)
|
8679
|
+
@underlined = args[:underlined] if args.key?(:underlined)
|
8680
|
+
end
|
8681
|
+
end
|
8682
|
+
|
8009
8683
|
# Detected non-text visual elements e.g. checkbox, signature etc. on the page.
|
8010
8684
|
class GoogleCloudDocumentaiV1beta2DocumentPageVisualElement
|
8011
8685
|
include Google::Apis::Core::Hashable
|
@@ -8715,7 +9389,7 @@ module Google
|
|
8715
9389
|
end
|
8716
9390
|
end
|
8717
9391
|
|
8718
|
-
# The long
|
9392
|
+
# The long-running operation metadata for BatchProcessDocuments.
|
8719
9393
|
class GoogleCloudDocumentaiV1beta3BatchProcessMetadata
|
8720
9394
|
include Google::Apis::Core::Hashable
|
8721
9395
|
|
@@ -8764,8 +9438,8 @@ module Google
|
|
8764
9438
|
include Google::Apis::Core::Hashable
|
8765
9439
|
|
8766
9440
|
# The name of the operation triggered by the processed document. If the human
|
8767
|
-
# review process
|
8768
|
-
# response type and metadata as the long
|
9441
|
+
# review process isn't triggered, this field will be empty. It has the same
|
9442
|
+
# response type and metadata as the long-running operation returned by the
|
8769
9443
|
# ReviewDocument method.
|
8770
9444
|
# Corresponds to the JSON property `humanReviewOperation`
|
8771
9445
|
# @return [String]
|
@@ -8776,16 +9450,15 @@ module Google
|
|
8776
9450
|
# @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta3HumanReviewStatus]
|
8777
9451
|
attr_accessor :human_review_status
|
8778
9452
|
|
8779
|
-
# The source of the document, same as the
|
8780
|
-
#
|
8781
|
-
# snapshot of that document, since a user can move or change that document
|
8782
|
-
# during the process.
|
9453
|
+
# The source of the document, same as the input_gcs_source field in the request
|
9454
|
+
# when the batch process started.
|
8783
9455
|
# Corresponds to the JSON property `inputGcsSource`
|
8784
9456
|
# @return [String]
|
8785
9457
|
attr_accessor :input_gcs_source
|
8786
9458
|
|
8787
|
-
# The
|
8788
|
-
# processed document if it was successful,
|
9459
|
+
# The Cloud Storage output destination (in the request as DocumentOutputConfig.
|
9460
|
+
# GcsOutputConfig.gcs_uri) of the processed document if it was successful,
|
9461
|
+
# otherwise empty.
|
8789
9462
|
# Corresponds to the JSON property `outputGcsDestination`
|
8790
9463
|
# @return [String]
|
8791
9464
|
attr_accessor :output_gcs_destination
|
@@ -8814,7 +9487,7 @@ module Google
|
|
8814
9487
|
end
|
8815
9488
|
end
|
8816
9489
|
|
8817
|
-
# Response message for
|
9490
|
+
# Response message for BatchProcessDocuments.
|
8818
9491
|
class GoogleCloudDocumentaiV1beta3BatchProcessResponse
|
8819
9492
|
include Google::Apis::Core::Hashable
|
8820
9493
|
|
@@ -8870,7 +9543,7 @@ module Google
|
|
8870
9543
|
end
|
8871
9544
|
end
|
8872
9545
|
|
8873
|
-
# The long
|
9546
|
+
# The long-running operation metadata for the DeleteProcessor method.
|
8874
9547
|
class GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata
|
8875
9548
|
include Google::Apis::Core::Hashable
|
8876
9549
|
|
@@ -8889,7 +9562,7 @@ module Google
|
|
8889
9562
|
end
|
8890
9563
|
end
|
8891
9564
|
|
8892
|
-
# The long
|
9565
|
+
# The long-running operation metadata for the DeleteProcessorVersion method.
|
8893
9566
|
class GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata
|
8894
9567
|
include Google::Apis::Core::Hashable
|
8895
9568
|
|
@@ -8908,7 +9581,7 @@ module Google
|
|
8908
9581
|
end
|
8909
9582
|
end
|
8910
9583
|
|
8911
|
-
# The long
|
9584
|
+
# The long-running operation metadata for the DeployProcessorVersion method.
|
8912
9585
|
class GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata
|
8913
9586
|
include Google::Apis::Core::Hashable
|
8914
9587
|
|
@@ -8927,7 +9600,7 @@ module Google
|
|
8927
9600
|
end
|
8928
9601
|
end
|
8929
9602
|
|
8930
|
-
# Response message for the
|
9603
|
+
# Response message for the DeployProcessorVersion method.
|
8931
9604
|
class GoogleCloudDocumentaiV1beta3DeployProcessorVersionResponse
|
8932
9605
|
include Google::Apis::Core::Hashable
|
8933
9606
|
|
@@ -8940,7 +9613,7 @@ module Google
|
|
8940
9613
|
end
|
8941
9614
|
end
|
8942
9615
|
|
8943
|
-
# The long
|
9616
|
+
# The long-running operation metadata for the DisableProcessor method.
|
8944
9617
|
class GoogleCloudDocumentaiV1beta3DisableProcessorMetadata
|
8945
9618
|
include Google::Apis::Core::Hashable
|
8946
9619
|
|
@@ -8959,7 +9632,7 @@ module Google
|
|
8959
9632
|
end
|
8960
9633
|
end
|
8961
9634
|
|
8962
|
-
# Response message for the
|
9635
|
+
# Response message for the DisableProcessor method. Intentionally empty proto
|
8963
9636
|
# for adding fields in future.
|
8964
9637
|
class GoogleCloudDocumentaiV1beta3DisableProcessorResponse
|
8965
9638
|
include Google::Apis::Core::Hashable
|
@@ -8973,7 +9646,7 @@ module Google
|
|
8973
9646
|
end
|
8974
9647
|
end
|
8975
9648
|
|
8976
|
-
# The long
|
9649
|
+
# The long-running operation metadata for the EnableProcessor method.
|
8977
9650
|
class GoogleCloudDocumentaiV1beta3EnableProcessorMetadata
|
8978
9651
|
include Google::Apis::Core::Hashable
|
8979
9652
|
|
@@ -8992,8 +9665,8 @@ module Google
|
|
8992
9665
|
end
|
8993
9666
|
end
|
8994
9667
|
|
8995
|
-
# Response message for the
|
8996
|
-
#
|
9668
|
+
# Response message for the EnableProcessor method. Intentionally empty proto for
|
9669
|
+
# adding fields in future.
|
8997
9670
|
class GoogleCloudDocumentaiV1beta3EnableProcessorResponse
|
8998
9671
|
include Google::Apis::Core::Hashable
|
8999
9672
|
|
@@ -9025,7 +9698,7 @@ module Google
|
|
9025
9698
|
end
|
9026
9699
|
end
|
9027
9700
|
|
9028
|
-
#
|
9701
|
+
# Response of the EvaluateProcessorVersion method.
|
9029
9702
|
class GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse
|
9030
9703
|
include Google::Apis::Core::Hashable
|
9031
9704
|
|
@@ -9049,9 +9722,9 @@ module Google
|
|
9049
9722
|
include Google::Apis::Core::Hashable
|
9050
9723
|
|
9051
9724
|
# 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
|
9725
|
+
# populated only when the state is `HUMAN_REVIEW_IN_PROGRESS`. It has the same
|
9726
|
+
# response type and metadata as the long-running operation returned by
|
9727
|
+
# ReviewDocument.
|
9055
9728
|
# Corresponds to the JSON property `humanReviewOperation`
|
9056
9729
|
# @return [String]
|
9057
9730
|
attr_accessor :human_review_operation
|
@@ -9078,7 +9751,7 @@ module Google
|
|
9078
9751
|
end
|
9079
9752
|
end
|
9080
9753
|
|
9081
|
-
# The long
|
9754
|
+
# The long-running operation metadata for the ImportProcessorVersion method.
|
9082
9755
|
class GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata
|
9083
9756
|
include Google::Apis::Core::Hashable
|
9084
9757
|
|
@@ -9116,7 +9789,7 @@ module Google
|
|
9116
9789
|
end
|
9117
9790
|
end
|
9118
9791
|
|
9119
|
-
# The long
|
9792
|
+
# The long-running operation metadata for the ReviewDocument method.
|
9120
9793
|
class GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata
|
9121
9794
|
include Google::Apis::Core::Hashable
|
9122
9795
|
|
@@ -9166,7 +9839,7 @@ module Google
|
|
9166
9839
|
end
|
9167
9840
|
end
|
9168
9841
|
|
9169
|
-
# Response message for
|
9842
|
+
# Response message for the ReviewDocument method.
|
9170
9843
|
class GoogleCloudDocumentaiV1beta3ReviewDocumentResponse
|
9171
9844
|
include Google::Apis::Core::Hashable
|
9172
9845
|
|
@@ -9198,7 +9871,7 @@ module Google
|
|
9198
9871
|
end
|
9199
9872
|
end
|
9200
9873
|
|
9201
|
-
# The long
|
9874
|
+
# The long-running operation metadata for the SetDefaultProcessorVersion method.
|
9202
9875
|
class GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata
|
9203
9876
|
include Google::Apis::Core::Hashable
|
9204
9877
|
|
@@ -9217,7 +9890,7 @@ module Google
|
|
9217
9890
|
end
|
9218
9891
|
end
|
9219
9892
|
|
9220
|
-
# Response message for
|
9893
|
+
# Response message for the SetDefaultProcessorVersion method.
|
9221
9894
|
class GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse
|
9222
9895
|
include Google::Apis::Core::Hashable
|
9223
9896
|
|
@@ -9304,7 +9977,7 @@ module Google
|
|
9304
9977
|
end
|
9305
9978
|
end
|
9306
9979
|
|
9307
|
-
# The response for
|
9980
|
+
# The response for TrainProcessorVersion.
|
9308
9981
|
class GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse
|
9309
9982
|
include Google::Apis::Core::Hashable
|
9310
9983
|
|
@@ -9323,7 +9996,7 @@ module Google
|
|
9323
9996
|
end
|
9324
9997
|
end
|
9325
9998
|
|
9326
|
-
# The long
|
9999
|
+
# The long-running operation metadata for the UndeployProcessorVersion method.
|
9327
10000
|
class GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata
|
9328
10001
|
include Google::Apis::Core::Hashable
|
9329
10002
|
|
@@ -9342,7 +10015,7 @@ module Google
|
|
9342
10015
|
end
|
9343
10016
|
end
|
9344
10017
|
|
9345
|
-
# Response message for the
|
10018
|
+
# Response message for the UndeployProcessorVersion method.
|
9346
10019
|
class GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse
|
9347
10020
|
include Google::Apis::Core::Hashable
|
9348
10021
|
|
@@ -9380,7 +10053,7 @@ module Google
|
|
9380
10053
|
end
|
9381
10054
|
end
|
9382
10055
|
|
9383
|
-
# A resource that represents Google Cloud
|
10056
|
+
# A resource that represents a Google Cloud location.
|
9384
10057
|
class GoogleCloudLocationLocation
|
9385
10058
|
include Google::Apis::Core::Hashable
|
9386
10059
|
|