google-apis-vision_v1 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: d80928b70b9361a260732f66eedc040d2059fe2734249592b60fa712e573cbff
4
- data.tar.gz: 2e57c0bff9ab5331db1180f1981ac26f6695fca2bc98bb34c0fdc148dd137483
3
+ metadata.gz: 065314032a3b8bb99b9cb4319b73f93d2ec14f3dbdf382cbebb33724cb41eaa6
4
+ data.tar.gz: 1d8cfa83bb6009a8abd046d7b3a91ea229111b667daa7303430667ce5c843560
5
5
  SHA512:
6
- metadata.gz: 44808ada4081cb7b99bdc6d6852ad39b02130c9492b2d5a8eb18a5a63a5c94f80a8b4bb38313d7471a0a6159d00c17234911371cdc972ffdac0b56f4c2bc85ec
7
- data.tar.gz: 14d90553c0e9426afdf47810ac11be01f50bf212cdf169487bdb5f9fb7dbeff9bf1e0a1b26a71a9daf89eefea2985e52a8451520d2094c854a81a41db41bd374
6
+ metadata.gz: f515bb3240fadfea23e8c56e9841879db469edef30f7fd8a7f21d5d08bed6667ceb49276c7b53db2e4cc6bbca418826e12a140c806bcddc71163a148af0f6ac7
7
+ data.tar.gz: 3cbee8fedde1064fd2612b153b6f2a443ae027a70a85c7ade1a58bdff1f6ecba0757f99dbae0a7a6bd41ed169f5d642866b1acf3d4b8b6ace1b59e1503a7d78f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Release history for google-apis-vision_v1
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 = 'V1'
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
@@ -645,61 +645,60 @@ module Google
645
645
 
646
646
  # Represents a color in the RGBA color space. This representation is designed
647
647
  # for simplicity of conversion to/from color representations in various
648
- # languages over compactness; for example, the fields of this representation can
649
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
650
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
648
+ # languages over compactness. For example, the fields of this representation can
649
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
650
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
651
651
  # method in iOS; and, with just a little work, it can be easily formatted into a
652
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
652
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
653
653
  # information about the absolute color space that should be used to interpret
654
654
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
655
- # applications SHOULD assume the sRGB color space. Note: when color equality
656
- # needs to be decided, implementations, unless documented otherwise, will treat
657
- # two colors to be equal if all their red, green, blue and alpha values each
658
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
659
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
660
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
661
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
662
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
663
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
664
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
665
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
666
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
667
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
668
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
669
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
670
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
671
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
672
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
673
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
674
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
675
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
676
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
677
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
678
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
679
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
655
+ # applications should assume the sRGB color space. When color equality needs to
656
+ # be decided, implementations, unless documented otherwise, treat two colors as
657
+ # equal if all their red, green, blue, and alpha values each differ by at most
658
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
659
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
660
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
661
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
662
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
663
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
664
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
665
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
666
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
667
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
668
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
669
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
670
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
671
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
672
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
673
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
674
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
675
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
676
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
677
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
678
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
679
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
680
680
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
681
681
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
682
682
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
683
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
683
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
684
684
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
685
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
686
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
687
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
688
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
689
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
690
- # join(''); `; // ...
685
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
686
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
687
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
688
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
689
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
690
+ # / ...
691
691
  class Color
692
692
  include Google::Apis::Core::Hashable
693
693
 
694
694
  # The fraction of this color that should be applied to the pixel. That is, the
695
- # final pixel color is defined by the equation: pixel color = alpha * (this
696
- # color) + (1.0 - alpha) * (background color) This means that a value of 1.0
695
+ # final pixel color is defined by the equation: `pixel color = alpha * (this
696
+ # color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
697
697
  # corresponds to a solid color, whereas a value of 0.0 corresponds to a
698
698
  # completely transparent color. This uses a wrapper message rather than a simple
699
699
  # float scalar so that it is possible to distinguish between a default value and
700
- # the value being unset. If omitted, this color object is to be rendered as a
701
- # solid color (as if the alpha value had been explicitly given with a value of 1.
702
- # 0).
700
+ # the value being unset. If omitted, this color object is rendered as a solid
701
+ # color (as if the alpha value had been explicitly given a value of 1.0).
703
702
  # Corresponds to the JSON property `alpha`
704
703
  # @return [Float]
705
704
  attr_accessor :alpha
@@ -739,49 +738,49 @@ module Google
739
738
 
740
739
  # Represents a color in the RGBA color space. This representation is designed
741
740
  # for simplicity of conversion to/from color representations in various
742
- # languages over compactness; for example, the fields of this representation can
743
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
744
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
741
+ # languages over compactness. For example, the fields of this representation can
742
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
743
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
745
744
  # method in iOS; and, with just a little work, it can be easily formatted into a
746
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
745
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
747
746
  # information about the absolute color space that should be used to interpret
748
747
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
749
- # applications SHOULD assume the sRGB color space. Note: when color equality
750
- # needs to be decided, implementations, unless documented otherwise, will treat
751
- # two colors to be equal if all their red, green, blue and alpha values each
752
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
753
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
754
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
755
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
756
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
757
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
758
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
759
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
760
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
761
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
762
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
763
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
764
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
765
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
766
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
767
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
768
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
769
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
770
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
771
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
772
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
773
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
748
+ # applications should assume the sRGB color space. When color equality needs to
749
+ # be decided, implementations, unless documented otherwise, treat two colors as
750
+ # equal if all their red, green, blue, and alpha values each differ by at most
751
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
752
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
753
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
754
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
755
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
756
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
757
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
758
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
759
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
760
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
761
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
762
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
763
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
764
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
765
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
766
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
767
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
768
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
769
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
770
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
771
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
772
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
774
773
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
775
774
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
776
775
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
777
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
776
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
778
777
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
779
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
780
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
781
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
782
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
783
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
784
- # join(''); `; // ...
778
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
779
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
780
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
781
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
782
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
783
+ # / ...
785
784
  # Corresponds to the JSON property `color`
786
785
  # @return [Google::Apis::VisionV1::Color]
787
786
  attr_accessor :color
@@ -1514,49 +1513,49 @@ module Google
1514
1513
 
1515
1514
  # Represents a color in the RGBA color space. This representation is designed
1516
1515
  # for simplicity of conversion to/from color representations in various
1517
- # languages over compactness; for example, the fields of this representation can
1518
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
1519
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1516
+ # languages over compactness. For example, the fields of this representation can
1517
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
1518
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
1520
1519
  # method in iOS; and, with just a little work, it can be easily formatted into a
1521
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
1520
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
1522
1521
  # information about the absolute color space that should be used to interpret
1523
1522
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
1524
- # applications SHOULD assume the sRGB color space. Note: when color equality
1525
- # needs to be decided, implementations, unless documented otherwise, will treat
1526
- # two colors to be equal if all their red, green, blue and alpha values each
1527
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
1528
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
1529
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
1530
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
1531
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
1532
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
1533
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
1534
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
1535
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
1536
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
1537
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
1538
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
1539
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
1540
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
1541
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
1542
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
1543
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
1544
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
1545
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
1546
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
1547
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
1548
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1523
+ # applications should assume the sRGB color space. When color equality needs to
1524
+ # be decided, implementations, unless documented otherwise, treat two colors as
1525
+ # equal if all their red, green, blue, and alpha values each differ by at most
1526
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
1527
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
1528
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
1529
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
1530
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
1531
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
1532
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
1533
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
1534
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
1535
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
1536
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
1537
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
1538
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
1539
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
1540
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
1541
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
1542
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
1543
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
1544
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
1545
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
1546
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
1547
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1549
1548
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
1550
1549
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
1551
1550
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
1552
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1551
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1553
1552
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
1554
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
1555
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
1556
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
1557
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
1558
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
1559
- # join(''); `; // ...
1553
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
1554
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
1555
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
1556
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
1557
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
1558
+ # / ...
1560
1559
  # Corresponds to the JSON property `color`
1561
1560
  # @return [Google::Apis::VisionV1::Color]
1562
1561
  attr_accessor :color
@@ -2054,8 +2053,8 @@ module Google
2054
2053
 
2055
2054
  # An object that represents a latitude/longitude pair. This is expressed as a
2056
2055
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
2057
- # specified otherwise, this must conform to the WGS84 standard. Values must be
2058
- # within normalized ranges.
2056
+ # specified otherwise, this object must conform to the WGS84 standard. Values
2057
+ # must be within normalized ranges.
2059
2058
  # Corresponds to the JSON property `latLng`
2060
2059
  # @return [Google::Apis::VisionV1::LatLng]
2061
2060
  attr_accessor :lat_lng
@@ -3234,49 +3233,49 @@ module Google
3234
3233
 
3235
3234
  # Represents a color in the RGBA color space. This representation is designed
3236
3235
  # for simplicity of conversion to/from color representations in various
3237
- # languages over compactness; for example, the fields of this representation can
3238
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
3239
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
3236
+ # languages over compactness. For example, the fields of this representation can
3237
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
3238
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
3240
3239
  # method in iOS; and, with just a little work, it can be easily formatted into a
3241
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
3240
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
3242
3241
  # information about the absolute color space that should be used to interpret
3243
3242
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
3244
- # applications SHOULD assume the sRGB color space. Note: when color equality
3245
- # needs to be decided, implementations, unless documented otherwise, will treat
3246
- # two colors to be equal if all their red, green, blue and alpha values each
3247
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
3248
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
3249
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
3250
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
3251
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
3252
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
3253
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
3254
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
3255
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
3256
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
3257
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
3258
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
3259
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
3260
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
3261
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
3262
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
3263
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
3264
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
3265
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
3266
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
3267
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
3268
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3243
+ # applications should assume the sRGB color space. When color equality needs to
3244
+ # be decided, implementations, unless documented otherwise, treat two colors as
3245
+ # equal if all their red, green, blue, and alpha values each differ by at most
3246
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
3247
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
3248
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
3249
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
3250
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
3251
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
3252
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
3253
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
3254
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
3255
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
3256
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
3257
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
3258
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
3259
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
3260
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
3261
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
3262
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
3263
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
3264
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
3265
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
3266
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
3267
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3269
3268
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3270
3269
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3271
3270
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3272
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3271
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3273
3272
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3274
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
3275
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
3276
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
3277
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
3278
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
3279
- # join(''); `; // ...
3273
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
3274
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
3275
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
3276
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
3277
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
3278
+ # / ...
3280
3279
  # Corresponds to the JSON property `color`
3281
3280
  # @return [Google::Apis::VisionV1::Color]
3282
3281
  attr_accessor :color
@@ -3774,8 +3773,8 @@ module Google
3774
3773
 
3775
3774
  # An object that represents a latitude/longitude pair. This is expressed as a
3776
3775
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
3777
- # specified otherwise, this must conform to the WGS84 standard. Values must be
3778
- # within normalized ranges.
3776
+ # specified otherwise, this object must conform to the WGS84 standard. Values
3777
+ # must be within normalized ranges.
3779
3778
  # Corresponds to the JSON property `latLng`
3780
3779
  # @return [Google::Apis::VisionV1::LatLng]
3781
3780
  attr_accessor :lat_lng
@@ -4988,49 +4987,49 @@ module Google
4988
4987
 
4989
4988
  # Represents a color in the RGBA color space. This representation is designed
4990
4989
  # for simplicity of conversion to/from color representations in various
4991
- # languages over compactness; for example, the fields of this representation can
4992
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
4993
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
4990
+ # languages over compactness. For example, the fields of this representation can
4991
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
4992
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
4994
4993
  # method in iOS; and, with just a little work, it can be easily formatted into a
4995
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
4994
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
4996
4995
  # information about the absolute color space that should be used to interpret
4997
4996
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
4998
- # applications SHOULD assume the sRGB color space. Note: when color equality
4999
- # needs to be decided, implementations, unless documented otherwise, will treat
5000
- # two colors to be equal if all their red, green, blue and alpha values each
5001
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
5002
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
5003
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
5004
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
5005
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
5006
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
5007
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
5008
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
5009
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
5010
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
5011
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
5012
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
5013
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
5014
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
5015
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
5016
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
5017
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
5018
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
5019
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
5020
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
5021
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
5022
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
4997
+ # applications should assume the sRGB color space. When color equality needs to
4998
+ # be decided, implementations, unless documented otherwise, treat two colors as
4999
+ # equal if all their red, green, blue, and alpha values each differ by at most
5000
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
5001
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
5002
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
5003
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
5004
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
5005
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
5006
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
5007
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
5008
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
5009
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
5010
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
5011
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
5012
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
5013
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
5014
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
5015
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
5016
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
5017
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
5018
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
5019
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
5020
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
5021
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
5023
5022
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
5024
5023
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
5025
5024
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
5026
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5025
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
5027
5026
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
5028
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
5029
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
5030
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
5031
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
5032
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
5033
- # join(''); `; // ...
5027
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
5028
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
5029
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
5030
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
5031
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
5032
+ # / ...
5034
5033
  # Corresponds to the JSON property `color`
5035
5034
  # @return [Google::Apis::VisionV1::Color]
5036
5035
  attr_accessor :color
@@ -5558,8 +5557,8 @@ module Google
5558
5557
 
5559
5558
  # An object that represents a latitude/longitude pair. This is expressed as a
5560
5559
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
5561
- # specified otherwise, this must conform to the WGS84 standard. Values must be
5562
- # within normalized ranges.
5560
+ # specified otherwise, this object must conform to the WGS84 standard. Values
5561
+ # must be within normalized ranges.
5563
5562
  # Corresponds to the JSON property `latLng`
5564
5563
  # @return [Google::Apis::VisionV1::LatLng]
5565
5564
  attr_accessor :lat_lng
@@ -6882,49 +6881,49 @@ module Google
6882
6881
 
6883
6882
  # Represents a color in the RGBA color space. This representation is designed
6884
6883
  # for simplicity of conversion to/from color representations in various
6885
- # languages over compactness; for example, the fields of this representation can
6886
- # be trivially provided to the constructor of "java.awt.Color" in Java; it can
6887
- # also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
6884
+ # languages over compactness. For example, the fields of this representation can
6885
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
6886
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
6888
6887
  # method in iOS; and, with just a little work, it can be easily formatted into a
6889
- # CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry
6888
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
6890
6889
  # information about the absolute color space that should be used to interpret
6891
6890
  # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
6892
- # applications SHOULD assume the sRGB color space. Note: when color equality
6893
- # needs to be decided, implementations, unless documented otherwise, will treat
6894
- # two colors to be equal if all their red, green, blue and alpha values each
6895
- # differ by at most 1e-5. Example (Java): import com.google.type.Color; // ...
6896
- # public static java.awt.Color fromProto(Color protocolor) ` float alpha =
6897
- # protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new
6898
- # java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(
6899
- # ), alpha); ` public static Color toProto(java.awt.Color color) ` float red = (
6900
- # float) color.getRed(); float green = (float) color.getGreen(); float blue = (
6901
- # float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder
6902
- # = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator)
6903
- # .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255)
6904
- # ` result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) /
6905
- # denominator) .build()); ` return resultBuilder.build(); ` // ... Example (iOS /
6906
- # Obj-C): // ... static UIColor* fromProto(Color* protocolor) ` float red = [
6907
- # protocolor red]; float green = [protocolor green]; float blue = [protocolor
6908
- # blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (
6909
- # alpha_wrapper != nil) ` alpha = [alpha_wrapper value]; ` return [UIColor
6910
- # colorWithRed:red green:green blue:blue alpha:alpha]; ` static Color* toProto(
6911
- # UIColor* color) ` CGFloat red, green, blue, alpha; if (![color getRed:&red
6912
- # green:&green blue:&blue alpha:&alpha]) ` return nil; ` Color* result = [[Color
6913
- # alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:
6914
- # blue]; if (alpha <= 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; `
6915
- # [result autorelease]; return result; ` // ... Example (JavaScript): // ...
6916
- # var protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
6891
+ # applications should assume the sRGB color space. When color equality needs to
6892
+ # be decided, implementations, unless documented otherwise, treat two colors as
6893
+ # equal if all their red, green, blue, and alpha values each differ by at most
6894
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
6895
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
6896
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
6897
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
6898
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
6899
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
6900
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
6901
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
6902
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
6903
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
6904
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
6905
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
6906
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
6907
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
6908
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
6909
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
6910
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
6911
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
6912
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
6913
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
6914
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
6915
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
6917
6916
  # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
6918
6917
  # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
6919
6918
  # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
6920
- # rgbToCssColor_(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
6919
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
6921
6920
  # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
6922
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor_ = function(red, green, blue)
6923
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
6924
- # hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length;
6925
- # var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) `
6926
- # resultBuilder.push('0'); ` resultBuilder.push(hexString); return resultBuilder.
6927
- # join(''); `; // ...
6921
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
6922
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
6923
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
6924
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
6925
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
6926
+ # / ...
6928
6927
  # Corresponds to the JSON property `color`
6929
6928
  # @return [Google::Apis::VisionV1::Color]
6930
6929
  attr_accessor :color
@@ -7486,8 +7485,8 @@ module Google
7486
7485
 
7487
7486
  # An object that represents a latitude/longitude pair. This is expressed as a
7488
7487
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
7489
- # specified otherwise, this must conform to the WGS84 standard. Values must be
7490
- # within normalized ranges.
7488
+ # specified otherwise, this object must conform to the WGS84 standard. Values
7489
+ # must be within normalized ranges.
7491
7490
  # Corresponds to the JSON property `latLng`
7492
7491
  # @return [Google::Apis::VisionV1::LatLng]
7493
7492
  attr_accessor :lat_lng
@@ -8557,6 +8556,12 @@ module Google
8557
8556
  # @return [Google::Apis::VisionV1::ProductSearchParams]
8558
8557
  attr_accessor :product_search_params
8559
8558
 
8559
+ # Parameters for text detections. This is used to control TEXT_DETECTION and
8560
+ # DOCUMENT_TEXT_DETECTION features.
8561
+ # Corresponds to the JSON property `textDetectionParams`
8562
+ # @return [Google::Apis::VisionV1::TextDetectionParams]
8563
+ attr_accessor :text_detection_params
8564
+
8560
8565
  # Parameters for web detection request.
8561
8566
  # Corresponds to the JSON property `webDetectionParams`
8562
8567
  # @return [Google::Apis::VisionV1::WebDetectionParams]
@@ -8572,6 +8577,7 @@ module Google
8572
8577
  @language_hints = args[:language_hints] if args.key?(:language_hints)
8573
8578
  @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
8574
8579
  @product_search_params = args[:product_search_params] if args.key?(:product_search_params)
8580
+ @text_detection_params = args[:text_detection_params] if args.key?(:text_detection_params)
8575
8581
  @web_detection_params = args[:web_detection_params] if args.key?(:web_detection_params)
8576
8582
  end
8577
8583
  end
@@ -8844,8 +8850,8 @@ module Google
8844
8850
 
8845
8851
  # An object that represents a latitude/longitude pair. This is expressed as a
8846
8852
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
8847
- # specified otherwise, this must conform to the WGS84 standard. Values must be
8848
- # within normalized ranges.
8853
+ # specified otherwise, this object must conform to the WGS84 standard. Values
8854
+ # must be within normalized ranges.
8849
8855
  class LatLng
8850
8856
  include Google::Apis::Core::Hashable
8851
8857
 
@@ -8876,16 +8882,16 @@ module Google
8876
8882
 
8877
8883
  # An object that represents a latitude/longitude pair. This is expressed as a
8878
8884
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
8879
- # specified otherwise, this must conform to the WGS84 standard. Values must be
8880
- # within normalized ranges.
8885
+ # specified otherwise, this object must conform to the WGS84 standard. Values
8886
+ # must be within normalized ranges.
8881
8887
  # Corresponds to the JSON property `maxLatLng`
8882
8888
  # @return [Google::Apis::VisionV1::LatLng]
8883
8889
  attr_accessor :max_lat_lng
8884
8890
 
8885
8891
  # An object that represents a latitude/longitude pair. This is expressed as a
8886
8892
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
8887
- # specified otherwise, this must conform to the WGS84 standard. Values must be
8888
- # within normalized ranges.
8893
+ # specified otherwise, this object must conform to the WGS84 standard. Values
8894
+ # must be within normalized ranges.
8889
8895
  # Corresponds to the JSON property `minLatLng`
8890
8896
  # @return [Google::Apis::VisionV1::LatLng]
8891
8897
  attr_accessor :min_lat_lng
@@ -9085,8 +9091,8 @@ module Google
9085
9091
 
9086
9092
  # An object that represents a latitude/longitude pair. This is expressed as a
9087
9093
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
9088
- # specified otherwise, this must conform to the WGS84 standard. Values must be
9089
- # within normalized ranges.
9094
+ # specified otherwise, this object must conform to the WGS84 standard. Values
9095
+ # must be within normalized ranges.
9090
9096
  # Corresponds to the JSON property `latLng`
9091
9097
  # @return [Google::Apis::VisionV1::LatLng]
9092
9098
  attr_accessor :lat_lng
@@ -9932,6 +9938,29 @@ module Google
9932
9938
  end
9933
9939
  end
9934
9940
 
9941
+ # Parameters for text detections. This is used to control TEXT_DETECTION and
9942
+ # DOCUMENT_TEXT_DETECTION features.
9943
+ class TextDetectionParams
9944
+ include Google::Apis::Core::Hashable
9945
+
9946
+ # By default, Cloud Vision API only includes confidence score for
9947
+ # DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
9948
+ # score for TEXT_DETECTION as well.
9949
+ # Corresponds to the JSON property `enableTextDetectionConfidenceScore`
9950
+ # @return [Boolean]
9951
+ attr_accessor :enable_text_detection_confidence_score
9952
+ alias_method :enable_text_detection_confidence_score?, :enable_text_detection_confidence_score
9953
+
9954
+ def initialize(**args)
9955
+ update!(**args)
9956
+ end
9957
+
9958
+ # Update properties of this object
9959
+ def update!(**args)
9960
+ @enable_text_detection_confidence_score = args[:enable_text_detection_confidence_score] if args.key?(:enable_text_detection_confidence_score)
9961
+ end
9962
+ end
9963
+
9935
9964
  # Additional information detected on the structural component.
9936
9965
  class TextProperty
9937
9966
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module VisionV1
18
18
  # Version of the google-apis-vision_v1 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
@@ -1648,6 +1648,12 @@ module Google
1648
1648
  include Google::Apis::Core::JsonObjectSupport
1649
1649
  end
1650
1650
 
1651
+ class TextDetectionParams
1652
+ class Representation < Google::Apis::Core::JsonRepresentation; end
1653
+
1654
+ include Google::Apis::Core::JsonObjectSupport
1655
+ end
1656
+
1651
1657
  class TextProperty
1652
1658
  class Representation < Google::Apis::Core::JsonRepresentation; end
1653
1659
 
@@ -4193,6 +4199,8 @@ module Google
4193
4199
 
4194
4200
  property :product_search_params, as: 'productSearchParams', class: Google::Apis::VisionV1::ProductSearchParams, decorator: Google::Apis::VisionV1::ProductSearchParams::Representation
4195
4201
 
4202
+ property :text_detection_params, as: 'textDetectionParams', class: Google::Apis::VisionV1::TextDetectionParams, decorator: Google::Apis::VisionV1::TextDetectionParams::Representation
4203
+
4196
4204
  property :web_detection_params, as: 'webDetectionParams', class: Google::Apis::VisionV1::WebDetectionParams, decorator: Google::Apis::VisionV1::WebDetectionParams::Representation
4197
4205
 
4198
4206
  end
@@ -4580,6 +4588,13 @@ module Google
4580
4588
  end
4581
4589
  end
4582
4590
 
4591
+ class TextDetectionParams
4592
+ # @private
4593
+ class Representation < Google::Apis::Core::JsonRepresentation
4594
+ property :enable_text_detection_confidence_score, as: 'enableTextDetectionConfidenceScore'
4595
+ end
4596
+ end
4597
+
4583
4598
  class TextProperty
4584
4599
  # @private
4585
4600
  class Representation < Google::Apis::Core::JsonRepresentation
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-vision_v1
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_v1/CHANGELOG.md
55
- documentation_uri: https://googleapis.dev/ruby/google-apis-vision_v1/v0.1.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-vision_v1/v0.6.0
56
56
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-vision_v1
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 V1