google-apis-vision_v1p1beta1 0.1.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec002b0ed3f7e409d766c3d5e274610a761473d03296e279701d9262405839bc
4
- data.tar.gz: 6ae67bd4004fe8d47bb46dc26e62753f6bf476988cfe34c025c5d2478f49ea5f
3
+ metadata.gz: df40da776bc4573ec0b78d597f83c757878118f93a67672cabf9b412ac4fe65d
4
+ data.tar.gz: 48af8e1b86e40804e65e09b8896a07c865b7631dae2b15eaa2630ae8a02bc081
5
5
  SHA512:
6
- metadata.gz: 20add9c26fbfa384f915c9970ba4e038bc7364d34cffeb4c749db477065ec17043abde2e1b82edbca78c36e7ecf83b82200de7c68cd10df4e57ecd847b58a5c5
7
- data.tar.gz: 4106ab46c2e450787d3fe958c519cfc4de47e541891792c97c8b66e4ff2abd3e34c4d0f4d92bcb2a3548ffbd85005a5c301fd7fafa75a0a529d0195bd6fb3bdd
6
+ metadata.gz: 318b76daf5e59b27528ec5f3fdb6c833439cd3dd0e264e804cc6001d8e1b857de72b6785369d3a8d7d492ce8de9c4b1197b86044dc445e77ad9bdf420a73709d
7
+ data.tar.gz: 84aa690a24661bf42f6e24e5710ddce7725d8801c4228f976020730a354d38fe846395bb52617b6ca68ff8ecdec2bf55507cbcca14a873fd0ee1d6f9c1600708
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Release history for google-apis-vision_v1p1beta1
2
2
 
3
+ ### v0.6.0 (2021-05-20)
4
+
5
+ * Unspecified changes
6
+
7
+ ### v0.5.0 (2021-04-27)
8
+
9
+ * Regenerated from discovery document revision 20210423
10
+
11
+ ### v0.4.0 (2021-03-18)
12
+
13
+ * Regenerated from discovery document revision 20210317
14
+ * Regenerated using generator version 0.2.0
15
+
16
+ ### v0.3.0 (2021-03-04)
17
+
18
+ * Unspecified changes
19
+
20
+ ### v0.2.0 (2021-02-10)
21
+
22
+ * Regenerated from discovery document revision 20210209
23
+ * Regenerated using generator version 0.1.2
24
+
3
25
  ### v0.1.0 (2021-01-07)
4
26
 
5
27
  * Regenerated using generator version 0.1.1
@@ -31,7 +31,7 @@ module Google
31
31
  # This is NOT the gem version.
32
32
  VERSION = 'V1p1beta1'
33
33
 
34
- # View and manage your data across Google Cloud Platform services
34
+ # See, edit, configure, and delete your Google Cloud Platform data
35
35
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
36
36
 
37
37
  # Apply machine learning models to understand and label images
@@ -358,61 +358,60 @@ module Google
358
358
 
359
359
  # Represents a color in the RGBA color space. This representation is designed
360
360
  # for simplicity of conversion to/from color representations in various
361
- # languages over compactness; for example, the fields of this representation can
362
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
363
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
361
+ # languages over compactness. For example, the fields of this representation can
362
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
363
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
364
364
  # method in iOS; and, with just a little work, it can be easily formatted into a
365
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
365
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
366
366
  # information about the absolute color space that should be used to interpret
367
367
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
368
- # applications SHOULD assume the sRGB color space. Note: when color equality
369
- # needs to be decided, implementations, unless documented otherwise, will treat
370
- # two colors to be equal if all their red, green, blue and alpha values each
371
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
372
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
373
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
374
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
375
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
376
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
377
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
378
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
379
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
380
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
381
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
382
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
383
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
384
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
385
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
386
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
387
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
388
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
389
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
390
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
391
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
392
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
368
+ # applications should assume the sRGB color space. When color equality needs to
369
+ # be decided, implementations, unless documented otherwise, treat two colors as
370
+ # equal if all their red, green, blue, and alpha values each differ by at most
371
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
372
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
373
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
374
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
375
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
376
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
377
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
378
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
379
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
380
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
381
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
382
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
383
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
384
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
385
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
386
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
387
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
388
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
389
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
390
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
391
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
392
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
393
393
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
394
394
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
395
395
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
396
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
396
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
397
397
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
398
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
399
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
400
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
401
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
402
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
403
- # join(''); `; // ...
398
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
399
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
400
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
401
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
402
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
403
+ # / ...
404
404
  class Color
405
405
  include Google::Apis::Core::Hashable
406
406
 
407
407
  # The fraction of this color that should be applied to the pixel. That is, the
408
- # final pixel color is defined by the equation: pixel color = alpha * (this
409
- # color) + (1.0 - alpha) * (background color) This means that a value of 1.0
408
+ # final pixel color is defined by the equation: `pixel color = alpha * (this
409
+ # color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
410
410
  # corresponds to a solid color, whereas a value of 0.0 corresponds to a
411
411
  # completely transparent color. This uses a wrapper message rather than a simple
412
412
  # float scalar so that it is possible to distinguish between a default value and
413
- # the value being unset. If omitted, this color object is to be rendered as a
414
- # solid color (as if the alpha value had been explicitly given with a value of 1.
415
- # 0).
413
+ # the value being unset. If omitted, this color object is rendered as a solid
414
+ # color (as if the alpha value had been explicitly given a value of 1.0).
416
415
  # Corresponds to the JSON property `alpha`
417
416
  # @return [Float]
418
417
  attr_accessor :alpha
@@ -452,49 +451,49 @@ module Google
452
451
 
453
452
  # Represents a color in the RGBA color space. This representation is designed
454
453
  # for simplicity of conversion to/from color representations in various
455
- # languages over compactness; for example, the fields of this representation can
456
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
457
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
454
+ # languages over compactness. For example, the fields of this representation can
455
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
456
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
458
457
  # method in iOS; and, with just a little work, it can be easily formatted into a
459
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
458
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
460
459
  # information about the absolute color space that should be used to interpret
461
460
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
462
- # applications SHOULD assume the sRGB color space. Note: when color equality
463
- # needs to be decided, implementations, unless documented otherwise, will treat
464
- # two colors to be equal if all their red, green, blue and alpha values each
465
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
466
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
467
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
468
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
469
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
470
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
471
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
472
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
473
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
474
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
475
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
476
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
477
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
478
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
479
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
480
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
481
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
482
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
483
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
484
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
485
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
486
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
461
+ # applications should assume the sRGB color space. When color equality needs to
462
+ # be decided, implementations, unless documented otherwise, treat two colors as
463
+ # equal if all their red, green, blue, and alpha values each differ by at most
464
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
465
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
466
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
467
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
468
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
469
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
470
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
471
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
472
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
473
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
474
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
475
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
476
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
477
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
478
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
479
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
480
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
481
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
482
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
483
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
484
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
485
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
487
486
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
488
487
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
489
488
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
490
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
489
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
491
490
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
492
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
493
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
494
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
495
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
496
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
497
- # join(''); `; // ...
491
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
492
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
493
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
494
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
495
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
496
+ # / ...
498
497
  # Corresponds to the JSON property `color`
499
498
  # @return [Google::Apis::VisionV1p1beta1::Color]
500
499
  attr_accessor :color
@@ -1426,49 +1425,49 @@ module Google
1426
1425
 
1427
1426
  # Represents a color in the RGBA color space. This representation is designed
1428
1427
  # for simplicity of conversion to/from color representations in various
1429
- # languages over compactness; for example, the fields of this representation can
1430
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
1431
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1428
+ # languages over compactness. For example, the fields of this representation can
1429
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
1430
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
1432
1431
  # method in iOS; and, with just a little work, it can be easily formatted into a
1433
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
1432
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
1434
1433
  # information about the absolute color space that should be used to interpret
1435
1434
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
1436
- # applications SHOULD assume the sRGB color space. Note: when color equality
1437
- # needs to be decided, implementations, unless documented otherwise, will treat
1438
- # two colors to be equal if all their red, green, blue and alpha values each
1439
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
1440
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
1441
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
1442
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
1443
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
1444
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
1445
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
1446
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
1447
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
1448
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
1449
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
1450
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
1451
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
1452
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
1453
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
1454
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
1455
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
1456
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
1457
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
1458
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
1459
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
1460
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1435
+ # applications should assume the sRGB color space. When color equality needs to
1436
+ # be decided, implementations, unless documented otherwise, treat two colors as
1437
+ # equal if all their red, green, blue, and alpha values each differ by at most
1438
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
1439
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
1440
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
1441
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
1442
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
1443
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
1444
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
1445
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
1446
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
1447
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
1448
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
1449
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
1450
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
1451
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
1452
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
1453
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
1454
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
1455
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
1456
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
1457
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
1458
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
1459
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1461
1460
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
1462
1461
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
1463
1462
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
1464
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1463
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1465
1464
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
1466
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
1467
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
1468
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
1469
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
1470
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
1471
- # join(''); `; // ...
1465
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
1466
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
1467
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
1468
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
1469
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
1470
+ # / ...
1472
1471
  # Corresponds to the JSON property `color`
1473
1472
  # @return [Google::Apis::VisionV1p1beta1::Color]
1474
1473
  attr_accessor :color
@@ -1979,6 +1978,12 @@ module Google
1979
1978
  # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1ProductSearchParams]
1980
1979
  attr_accessor :product_search_params
1981
1980
 
1981
+ # Parameters for text detections. This is used to control TEXT_DETECTION and
1982
+ # DOCUMENT_TEXT_DETECTION features.
1983
+ # Corresponds to the JSON property `textDetectionParams`
1984
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextDetectionParams]
1985
+ attr_accessor :text_detection_params
1986
+
1982
1987
  # Parameters for web detection request.
1983
1988
  # Corresponds to the JSON property `webDetectionParams`
1984
1989
  # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionParams]
@@ -1994,6 +1999,7 @@ module Google
1994
1999
  @language_hints = args[:language_hints] if args.key?(:language_hints)
1995
2000
  @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
1996
2001
  @product_search_params = args[:product_search_params] if args.key?(:product_search_params)
2002
+ @text_detection_params = args[:text_detection_params] if args.key?(:text_detection_params)
1997
2003
  @web_detection_params = args[:web_detection_params] if args.key?(:web_detection_params)
1998
2004
  end
1999
2005
  end
@@ -2097,16 +2103,16 @@ module Google
2097
2103
 
2098
2104
  # An object that represents a latitude/longitude pair. This is expressed as a
2099
2105
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
2100
- # specified otherwise, this must conform to the WGS84 standard. Values must be
2101
- # within normalized ranges.
2106
+ # specified otherwise, this object must conform to the WGS84 standard. Values
2107
+ # must be within normalized ranges.
2102
2108
  # Corresponds to the JSON property `maxLatLng`
2103
2109
  # @return [Google::Apis::VisionV1p1beta1::LatLng]
2104
2110
  attr_accessor :max_lat_lng
2105
2111
 
2106
2112
  # An object that represents a latitude/longitude pair. This is expressed as a
2107
2113
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
2108
- # specified otherwise, this must conform to the WGS84 standard. Values must be
2109
- # within normalized ranges.
2114
+ # specified otherwise, this object must conform to the WGS84 standard. Values
2115
+ # must be within normalized ranges.
2110
2116
  # Corresponds to the JSON property `minLatLng`
2111
2117
  # @return [Google::Apis::VisionV1p1beta1::LatLng]
2112
2118
  attr_accessor :min_lat_lng
@@ -2172,8 +2178,8 @@ module Google
2172
2178
 
2173
2179
  # An object that represents a latitude/longitude pair. This is expressed as a
2174
2180
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
2175
- # specified otherwise, this must conform to the WGS84 standard. Values must be
2176
- # within normalized ranges.
2181
+ # specified otherwise, this object must conform to the WGS84 standard. Values
2182
+ # must be within normalized ranges.
2177
2183
  # Corresponds to the JSON property `latLng`
2178
2184
  # @return [Google::Apis::VisionV1p1beta1::LatLng]
2179
2185
  attr_accessor :lat_lng
@@ -2887,6 +2893,29 @@ module Google
2887
2893
  end
2888
2894
  end
2889
2895
 
2896
+ # Parameters for text detections. This is used to control TEXT_DETECTION and
2897
+ # DOCUMENT_TEXT_DETECTION features.
2898
+ class GoogleCloudVisionV1p1beta1TextDetectionParams
2899
+ include Google::Apis::Core::Hashable
2900
+
2901
+ # By default, Cloud Vision API only includes confidence score for
2902
+ # DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
2903
+ # score for TEXT_DETECTION as well.
2904
+ # Corresponds to the JSON property `enableTextDetectionConfidenceScore`
2905
+ # @return [Boolean]
2906
+ attr_accessor :enable_text_detection_confidence_score
2907
+ alias_method :enable_text_detection_confidence_score?, :enable_text_detection_confidence_score
2908
+
2909
+ def initialize(**args)
2910
+ update!(**args)
2911
+ end
2912
+
2913
+ # Update properties of this object
2914
+ def update!(**args)
2915
+ @enable_text_detection_confidence_score = args[:enable_text_detection_confidence_score] if args.key?(:enable_text_detection_confidence_score)
2916
+ end
2917
+ end
2918
+
2890
2919
  # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are
2891
2920
  # in the same scale as the original image.
2892
2921
  class GoogleCloudVisionV1p1beta1Vertex
@@ -3422,49 +3451,49 @@ module Google
3422
3451
 
3423
3452
  # Represents a color in the RGBA color space. This representation is designed
3424
3453
  # for simplicity of conversion to/from color representations in various
3425
- # languages over compactness; for example, the fields of this representation can
3426
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
3427
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3454
+ # languages over compactness. For example, the fields of this representation can
3455
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
3456
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
3428
3457
  # method in iOS; and, with just a little work, it can be easily formatted into a
3429
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
3458
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
3430
3459
  # information about the absolute color space that should be used to interpret
3431
3460
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
3432
- # applications SHOULD assume the sRGB color space. Note: when color equality
3433
- # needs to be decided, implementations, unless documented otherwise, will treat
3434
- # two colors to be equal if all their red, green, blue and alpha values each
3435
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
3436
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
3437
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
3438
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
3439
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
3440
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
3441
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
3442
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
3443
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
3444
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
3445
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
3446
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
3447
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
3448
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
3449
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
3450
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
3451
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
3452
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
3453
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
3454
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
3455
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
3456
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3461
+ # applications should assume the sRGB color space. When color equality needs to
3462
+ # be decided, implementations, unless documented otherwise, treat two colors as
3463
+ # equal if all their red, green, blue, and alpha values each differ by at most
3464
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
3465
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
3466
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
3467
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
3468
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
3469
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
3470
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
3471
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
3472
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
3473
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
3474
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
3475
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
3476
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
3477
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
3478
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
3479
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
3480
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
3481
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
3482
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
3483
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
3484
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
3485
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3457
3486
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3458
3487
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3459
3488
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3460
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3489
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3461
3490
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3462
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
3463
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
3464
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
3465
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
3466
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
3467
- # join(''); `; // ...
3491
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
3492
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
3493
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
3494
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
3495
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
3496
+ # / ...
3468
3497
  # Corresponds to the JSON property `color`
3469
3498
  # @return [Google::Apis::VisionV1p1beta1::Color]
3470
3499
  attr_accessor :color
@@ -3962,8 +3991,8 @@ module Google
3962
3991
 
3963
3992
  # An object that represents a latitude/longitude pair. This is expressed as a
3964
3993
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
3965
- # specified otherwise, this must conform to the WGS84 standard. Values must be
3966
- # within normalized ranges.
3994
+ # specified otherwise, this object must conform to the WGS84 standard. Values
3995
+ # must be within normalized ranges.
3967
3996
  # Corresponds to the JSON property `latLng`
3968
3997
  # @return [Google::Apis::VisionV1p1beta1::LatLng]
3969
3998
  attr_accessor :lat_lng
@@ -5176,49 +5205,49 @@ module Google
5176
5205
 
5177
5206
  # Represents a color in the RGBA color space. This representation is designed
5178
5207
  # for simplicity of conversion to/from color representations in various
5179
- # languages over compactness; for example, the fields of this representation can
5180
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
5181
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
5208
+ # languages over compactness. For example, the fields of this representation can
5209
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
5210
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
5182
5211
  # method in iOS; and, with just a little work, it can be easily formatted into a
5183
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
5212
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
5184
5213
  # information about the absolute color space that should be used to interpret
5185
5214
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
5186
- # applications SHOULD assume the sRGB color space. Note: when color equality
5187
- # needs to be decided, implementations, unless documented otherwise, will treat
5188
- # two colors to be equal if all their red, green, blue and alpha values each
5189
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
5190
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
5191
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
5192
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
5193
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
5194
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
5195
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
5196
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
5197
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
5198
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
5199
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
5200
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
5201
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
5202
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
5203
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
5204
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
5205
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
5206
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
5207
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
5208
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
5209
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
5210
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
5215
+ # applications should assume the sRGB color space. When color equality needs to
5216
+ # be decided, implementations, unless documented otherwise, treat two colors as
5217
+ # equal if all their red, green, blue, and alpha values each differ by at most
5218
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
5219
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
5220
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
5221
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
5222
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
5223
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
5224
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
5225
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
5226
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
5227
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
5228
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
5229
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
5230
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
5231
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
5232
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
5233
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
5234
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
5235
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
5236
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
5237
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
5238
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
5239
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
5211
5240
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
5212
5241
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
5213
5242
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
5214
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5243
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5215
5244
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
5216
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
5217
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
5218
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
5219
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
5220
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
5221
- # join(''); `; // ...
5245
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
5246
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
5247
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
5248
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
5249
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
5250
+ # / ...
5222
5251
  # Corresponds to the JSON property `color`
5223
5252
  # @return [Google::Apis::VisionV1p1beta1::Color]
5224
5253
  attr_accessor :color
@@ -5746,8 +5775,8 @@ module Google
5746
5775
 
5747
5776
  # An object that represents a latitude/longitude pair. This is expressed as a
5748
5777
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
5749
- # specified otherwise, this must conform to the WGS84 standard. Values must be
5750
- # within normalized ranges.
5778
+ # specified otherwise, this object must conform to the WGS84 standard. Values
5779
+ # must be within normalized ranges.
5751
5780
  # Corresponds to the JSON property `latLng`
5752
5781
  # @return [Google::Apis::VisionV1p1beta1::LatLng]
5753
5782
  attr_accessor :lat_lng
@@ -7070,49 +7099,49 @@ module Google
7070
7099
 
7071
7100
  # Represents a color in the RGBA color space. This representation is designed
7072
7101
  # for simplicity of conversion to/from color representations in various
7073
- # languages over compactness; for example, the fields of this representation can
7074
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
7075
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
7102
+ # languages over compactness. For example, the fields of this representation can
7103
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
7104
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
7076
7105
  # method in iOS; and, with just a little work, it can be easily formatted into a
7077
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
7106
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
7078
7107
  # information about the absolute color space that should be used to interpret
7079
7108
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
7080
- # applications SHOULD assume the sRGB color space. Note: when color equality
7081
- # needs to be decided, implementations, unless documented otherwise, will treat
7082
- # two colors to be equal if all their red, green, blue and alpha values each
7083
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
7084
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
7085
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
7086
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
7087
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
7088
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
7089
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
7090
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
7091
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
7092
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
7093
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
7094
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
7095
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
7096
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
7097
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
7098
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
7099
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
7100
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
7101
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
7102
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
7103
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
7104
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
7109
+ # applications should assume the sRGB color space. When color equality needs to
7110
+ # be decided, implementations, unless documented otherwise, treat two colors as
7111
+ # equal if all their red, green, blue, and alpha values each differ by at most
7112
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
7113
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
7114
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
7115
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
7116
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
7117
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
7118
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
7119
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
7120
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
7121
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
7122
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
7123
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
7124
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
7125
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
7126
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
7127
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
7128
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
7129
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
7130
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
7131
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
7132
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
7133
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
7105
7134
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
7106
7135
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
7107
7136
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
7108
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
7137
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
7109
7138
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
7110
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
7111
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
7112
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
7113
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
7114
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
7115
- # join(''); `; // ...
7139
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
7140
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
7141
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
7142
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
7143
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
7144
+ # / ...
7116
7145
  # Corresponds to the JSON property `color`
7117
7146
  # @return [Google::Apis::VisionV1p1beta1::Color]
7118
7147
  attr_accessor :color
@@ -7674,8 +7703,8 @@ module Google
7674
7703
 
7675
7704
  # An object that represents a latitude/longitude pair. This is expressed as a
7676
7705
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
7677
- # specified otherwise, this must conform to the WGS84 standard. Values must be
7678
- # within normalized ranges.
7706
+ # specified otherwise, this object must conform to the WGS84 standard. Values
7707
+ # must be within normalized ranges.
7679
7708
  # Corresponds to the JSON property `latLng`
7680
7709
  # @return [Google::Apis::VisionV1p1beta1::LatLng]
7681
7710
  attr_accessor :lat_lng
@@ -8826,8 +8855,8 @@ module Google
8826
8855
 
8827
8856
  # An object that represents a latitude/longitude pair. This is expressed as a
8828
8857
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
8829
- # specified otherwise, this must conform to the WGS84 standard. Values must be
8830
- # within normalized ranges.
8858
+ # specified otherwise, this object must conform to the WGS84 standard. Values
8859
+ # must be within normalized ranges.
8831
8860
  class LatLng
8832
8861
  include Google::Apis::Core::Hashable
8833
8862
 
@@ -8902,8 +8931,8 @@ module Google
8902
8931
 
8903
8932
  # An object that represents a latitude/longitude pair. This is expressed as a
8904
8933
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
8905
- # specified otherwise, this must conform to the WGS84 standard. Values must be
8906
- # within normalized ranges.
8934
+ # specified otherwise, this object must conform to the WGS84 standard. Values
8935
+ # must be within normalized ranges.
8907
8936
  # Corresponds to the JSON property `latLng`
8908
8937
  # @return [Google::Apis::VisionV1p1beta1::LatLng]
8909
8938
  attr_accessor :lat_lng
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module VisionV1p1beta1
18
18
  # Version of the google-apis-vision_v1p1beta1 gem
19
- GEM_VERSION = "0.1.0"
19
+ GEM_VERSION = "0.6.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.1.1"
22
+ GENERATOR_VERSION = "0.2.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20201023"
25
+ REVISION = "20210423"
26
26
  end
27
27
  end
28
28
  end
@@ -472,6 +472,12 @@ module Google
472
472
  include Google::Apis::Core::JsonObjectSupport
473
473
  end
474
474
 
475
+ class GoogleCloudVisionV1p1beta1TextDetectionParams
476
+ class Representation < Google::Apis::Core::JsonRepresentation; end
477
+
478
+ include Google::Apis::Core::JsonObjectSupport
479
+ end
480
+
475
481
  class GoogleCloudVisionV1p1beta1Vertex
476
482
  class Representation < Google::Apis::Core::JsonRepresentation; end
477
483
 
@@ -2172,6 +2178,8 @@ module Google
2172
2178
 
2173
2179
  property :product_search_params, as: 'productSearchParams', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1ProductSearchParams, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1ProductSearchParams::Representation
2174
2180
 
2181
+ property :text_detection_params, as: 'textDetectionParams', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextDetectionParams, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextDetectionParams::Representation
2182
+
2175
2183
  property :web_detection_params, as: 'webDetectionParams', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionParams, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionParams::Representation
2176
2184
 
2177
2185
  end
@@ -2435,6 +2443,13 @@ module Google
2435
2443
  end
2436
2444
  end
2437
2445
 
2446
+ class GoogleCloudVisionV1p1beta1TextDetectionParams
2447
+ # @private
2448
+ class Representation < Google::Apis::Core::JsonRepresentation
2449
+ property :enable_text_detection_confidence_score, as: 'enableTextDetectionConfidenceScore'
2450
+ end
2451
+ end
2452
+
2438
2453
  class GoogleCloudVisionV1p1beta1Vertex
2439
2454
  # @private
2440
2455
  class Representation < Google::Apis::Core::JsonRepresentation
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-vision_v1p1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-08 00:00:00.000000000 Z
11
+ date: 2021-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -52,7 +52,7 @@ licenses:
52
52
  metadata:
53
53
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
54
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-vision_v1p1beta1/CHANGELOG.md
55
- documentation_uri: https://googleapis.dev/ruby/google-apis-vision_v1p1beta1/v0.1.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-vision_v1p1beta1/v0.6.0
56
56
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-vision_v1p1beta1
57
57
  post_install_message:
58
58
  rdoc_options: []
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: '2.4'
65
+ version: '2.5'
66
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.1.4
72
+ rubygems_version: 3.2.17
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Simple REST client for Cloud Vision API V1p1beta1