google-api-client 0.13.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/README.md +6 -2
  4. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +46 -46
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +15 -15
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +4 -4
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +404 -435
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +107 -121
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +657 -713
  11. data/generated/google/apis/admin_directory_v1.rb +1 -1
  12. data/generated/google/apis/admin_directory_v1/classes.rb +45 -5
  13. data/generated/google/apis/admin_directory_v1/representations.rb +16 -0
  14. data/generated/google/apis/admin_directory_v1/service.rb +4 -1
  15. data/generated/google/apis/admin_reports_v1.rb +1 -1
  16. data/generated/google/apis/adsense_v1_4.rb +1 -1
  17. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  18. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  19. data/generated/google/apis/analyticsreporting_v4/classes.rb +399 -399
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +101 -101
  21. data/generated/google/apis/analyticsreporting_v4/service.rb +10 -10
  22. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  23. data/generated/google/apis/appengine_v1.rb +4 -4
  24. data/generated/google/apis/appengine_v1/classes.rb +747 -747
  25. data/generated/google/apis/appengine_v1/representations.rb +158 -158
  26. data/generated/google/apis/appengine_v1/service.rb +214 -214
  27. data/generated/google/apis/appsactivity_v1.rb +1 -1
  28. data/generated/google/apis/appstate_v1.rb +1 -1
  29. data/generated/google/apis/bigquery_v2.rb +1 -1
  30. data/generated/google/apis/bigquery_v2/classes.rb +6 -0
  31. data/generated/google/apis/bigquery_v2/representations.rb +2 -0
  32. data/generated/google/apis/calendar_v3.rb +1 -1
  33. data/generated/google/apis/classroom_v1.rb +7 -7
  34. data/generated/google/apis/classroom_v1/classes.rb +517 -515
  35. data/generated/google/apis/classroom_v1/representations.rb +147 -147
  36. data/generated/google/apis/classroom_v1/service.rb +1144 -1143
  37. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  38. data/generated/google/apis/cloudbuild_v1/classes.rb +435 -386
  39. data/generated/google/apis/cloudbuild_v1/representations.rb +133 -115
  40. data/generated/google/apis/cloudbuild_v1/service.rb +148 -148
  41. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  42. data/generated/google/apis/clouddebugger_v2/classes.rb +708 -708
  43. data/generated/google/apis/clouddebugger_v2/representations.rb +146 -146
  44. data/generated/google/apis/clouddebugger_v2/service.rb +124 -124
  45. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  46. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +142 -142
  47. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +29 -29
  48. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +87 -87
  49. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  50. data/generated/google/apis/cloudfunctions_v1/service.rb +6 -6
  51. data/generated/google/apis/cloudkms_v1.rb +1 -1
  52. data/generated/google/apis/cloudkms_v1/classes.rb +692 -675
  53. data/generated/google/apis/cloudkms_v1/representations.rb +144 -144
  54. data/generated/google/apis/cloudkms_v1/service.rb +276 -276
  55. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  56. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1168 -1168
  57. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +190 -190
  58. data/generated/google/apis/cloudresourcemanager_v1/service.rb +311 -288
  59. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +406 -406
  61. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +95 -95
  62. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +242 -234
  63. data/generated/google/apis/cloudtrace_v1.rb +4 -4
  64. data/generated/google/apis/cloudtrace_v1/classes.rb +68 -68
  65. data/generated/google/apis/cloudtrace_v1/representations.rb +22 -22
  66. data/generated/google/apis/cloudtrace_v1/service.rb +48 -48
  67. data/generated/google/apis/compute_beta.rb +1 -1
  68. data/generated/google/apis/compute_beta/classes.rb +82 -6
  69. data/generated/google/apis/compute_beta/representations.rb +4 -0
  70. data/generated/google/apis/compute_beta/service.rb +1177 -834
  71. data/generated/google/apis/compute_v1.rb +1 -1
  72. data/generated/google/apis/compute_v1/classes.rb +371 -1
  73. data/generated/google/apis/compute_v1/representations.rb +139 -0
  74. data/generated/google/apis/compute_v1/service.rb +257 -9
  75. data/generated/google/apis/container_v1.rb +1 -1
  76. data/generated/google/apis/container_v1/classes.rb +1122 -826
  77. data/generated/google/apis/container_v1/representations.rb +279 -135
  78. data/generated/google/apis/container_v1/service.rb +440 -98
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/service.rb +3 -1
  81. data/generated/google/apis/customsearch_v1.rb +1 -1
  82. data/generated/google/apis/dataflow_v1b3.rb +4 -4
  83. data/generated/google/apis/dataflow_v1b3/classes.rb +3423 -3423
  84. data/generated/google/apis/dataflow_v1b3/representations.rb +813 -813
  85. data/generated/google/apis/dataflow_v1b3/service.rb +410 -410
  86. data/generated/google/apis/dataproc_v1.rb +1 -1
  87. data/generated/google/apis/dataproc_v1/classes.rb +450 -431
  88. data/generated/google/apis/dataproc_v1/representations.rb +92 -92
  89. data/generated/google/apis/dataproc_v1/service.rb +200 -200
  90. data/generated/google/apis/datastore_v1.rb +4 -4
  91. data/generated/google/apis/datastore_v1/classes.rb +397 -397
  92. data/generated/google/apis/datastore_v1/representations.rb +100 -100
  93. data/generated/google/apis/datastore_v1/service.rb +62 -62
  94. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  95. data/generated/google/apis/deploymentmanager_v2/classes.rb +79 -3
  96. data/generated/google/apis/deploymentmanager_v2/representations.rb +33 -0
  97. data/generated/google/apis/deploymentmanager_v2/service.rb +15 -20
  98. data/generated/google/apis/dns_v1.rb +1 -1
  99. data/generated/google/apis/dns_v2beta1.rb +1 -1
  100. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  101. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +2 -2
  102. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  103. data/generated/google/apis/drive_v2.rb +1 -1
  104. data/generated/google/apis/drive_v2/service.rb +1 -1
  105. data/generated/google/apis/drive_v3.rb +1 -1
  106. data/generated/google/apis/drive_v3/service.rb +1 -1
  107. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  108. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +87 -87
  109. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +27 -27
  110. data/generated/google/apis/firebaserules_v1/classes.rb +271 -271
  111. data/generated/google/apis/firebaserules_v1/representations.rb +82 -82
  112. data/generated/google/apis/firebaserules_v1/service.rb +151 -151
  113. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  114. data/generated/google/apis/games_management_v1management.rb +1 -1
  115. data/generated/google/apis/games_v1.rb +1 -1
  116. data/generated/google/apis/genomics_v1.rb +9 -9
  117. data/generated/google/apis/genomics_v1/classes.rb +2242 -2242
  118. data/generated/google/apis/genomics_v1/representations.rb +306 -306
  119. data/generated/google/apis/genomics_v1/service.rb +1172 -1172
  120. data/generated/google/apis/gmail_v1.rb +1 -1
  121. data/generated/google/apis/iam_v1.rb +1 -1
  122. data/generated/google/apis/iam_v1/classes.rb +243 -243
  123. data/generated/google/apis/iam_v1/representations.rb +79 -79
  124. data/generated/google/apis/iam_v1/service.rb +137 -137
  125. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  126. data/generated/google/apis/identitytoolkit_v3/classes.rb +18 -0
  127. data/generated/google/apis/identitytoolkit_v3/representations.rb +3 -0
  128. data/generated/google/apis/kgsearch_v1/classes.rb +9 -9
  129. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  130. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  131. data/generated/google/apis/language_v1.rb +1 -1
  132. data/generated/google/apis/language_v1/classes.rb +451 -451
  133. data/generated/google/apis/language_v1/representations.rb +103 -103
  134. data/generated/google/apis/language_v1/service.rb +49 -49
  135. data/generated/google/apis/language_v1beta1.rb +1 -1
  136. data/generated/google/apis/language_v1beta1/classes.rb +459 -459
  137. data/generated/google/apis/language_v1beta1/representations.rb +110 -110
  138. data/generated/google/apis/language_v1beta1/service.rb +43 -43
  139. data/generated/google/apis/logging_v2.rb +8 -8
  140. data/generated/google/apis/logging_v2/classes.rb +915 -915
  141. data/generated/google/apis/logging_v2/representations.rb +142 -142
  142. data/generated/google/apis/logging_v2/service.rb +415 -415
  143. data/generated/google/apis/logging_v2beta1.rb +8 -8
  144. data/generated/google/apis/logging_v2beta1/classes.rb +905 -905
  145. data/generated/google/apis/logging_v2beta1/representations.rb +150 -150
  146. data/generated/google/apis/logging_v2beta1/service.rb +221 -221
  147. data/generated/google/apis/manufacturers_v1.rb +1 -1
  148. data/generated/google/apis/manufacturers_v1/classes.rb +334 -315
  149. data/generated/google/apis/manufacturers_v1/representations.rb +99 -87
  150. data/generated/google/apis/manufacturers_v1/service.rb +101 -4
  151. data/generated/google/apis/ml_v1.rb +1 -1
  152. data/generated/google/apis/ml_v1/classes.rb +709 -673
  153. data/generated/google/apis/ml_v1/representations.rb +154 -151
  154. data/generated/google/apis/ml_v1/service.rb +341 -354
  155. data/generated/google/apis/monitoring_v3.rb +6 -6
  156. data/generated/google/apis/monitoring_v3/classes.rb +869 -869
  157. data/generated/google/apis/monitoring_v3/representations.rb +171 -171
  158. data/generated/google/apis/monitoring_v3/service.rb +340 -340
  159. data/generated/google/apis/partners_v2.rb +1 -1
  160. data/generated/google/apis/partners_v2/classes.rb +1569 -1569
  161. data/generated/google/apis/partners_v2/representations.rb +256 -256
  162. data/generated/google/apis/partners_v2/service.rb +530 -530
  163. data/generated/google/apis/people_v1.rb +7 -7
  164. data/generated/google/apis/people_v1/classes.rb +1287 -946
  165. data/generated/google/apis/people_v1/representations.rb +355 -203
  166. data/generated/google/apis/people_v1/service.rb +409 -32
  167. data/generated/google/apis/plus_domains_v1.rb +1 -1
  168. data/generated/google/apis/plus_v1.rb +1 -1
  169. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  170. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +445 -445
  171. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +104 -104
  172. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +241 -241
  173. data/generated/google/apis/pubsub_v1.rb +4 -4
  174. data/generated/google/apis/pubsub_v1/classes.rb +286 -287
  175. data/generated/google/apis/pubsub_v1/representations.rb +80 -80
  176. data/generated/google/apis/pubsub_v1/service.rb +178 -178
  177. data/generated/google/apis/runtimeconfig_v1.rb +1 -1
  178. data/generated/google/apis/runtimeconfig_v1/classes.rb +52 -52
  179. data/generated/google/apis/runtimeconfig_v1/representations.rb +15 -15
  180. data/generated/google/apis/runtimeconfig_v1/service.rb +21 -21
  181. data/generated/google/apis/script_v1.rb +4 -4
  182. data/generated/google/apis/script_v1/classes.rb +172 -172
  183. data/generated/google/apis/script_v1/representations.rb +41 -41
  184. data/generated/google/apis/script_v1/service.rb +6 -6
  185. data/generated/google/apis/searchconsole_v1.rb +1 -1
  186. data/generated/google/apis/searchconsole_v1/classes.rb +6 -6
  187. data/generated/google/apis/searchconsole_v1/representations.rb +1 -1
  188. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  189. data/generated/google/apis/servicecontrol_v1/classes.rb +1110 -1110
  190. data/generated/google/apis/servicecontrol_v1/representations.rb +215 -215
  191. data/generated/google/apis/servicecontrol_v1/service.rb +65 -65
  192. data/generated/google/apis/servicemanagement_v1.rb +6 -6
  193. data/generated/google/apis/servicemanagement_v1/classes.rb +3594 -3562
  194. data/generated/google/apis/servicemanagement_v1/representations.rb +564 -562
  195. data/generated/google/apis/servicemanagement_v1/service.rb +253 -253
  196. data/generated/google/apis/serviceuser_v1.rb +1 -1
  197. data/generated/google/apis/serviceuser_v1/classes.rb +2678 -2670
  198. data/generated/google/apis/serviceuser_v1/representations.rb +269 -268
  199. data/generated/google/apis/serviceuser_v1/service.rb +59 -59
  200. data/generated/google/apis/sheets_v4.rb +5 -5
  201. data/generated/google/apis/sheets_v4/classes.rb +5155 -5104
  202. data/generated/google/apis/sheets_v4/representations.rb +957 -940
  203. data/generated/google/apis/sheets_v4/service.rb +175 -175
  204. data/generated/google/apis/slides_v1.rb +1 -1
  205. data/generated/google/apis/slides_v1/classes.rb +2932 -2905
  206. data/generated/google/apis/slides_v1/representations.rb +709 -694
  207. data/generated/google/apis/slides_v1/service.rb +50 -50
  208. data/generated/google/apis/sourcerepo_v1/classes.rb +139 -139
  209. data/generated/google/apis/sourcerepo_v1/representations.rb +40 -40
  210. data/generated/google/apis/sourcerepo_v1/service.rb +61 -61
  211. data/generated/google/apis/spanner_v1.rb +7 -1
  212. data/generated/google/apis/spanner_v1/classes.rb +2362 -2299
  213. data/generated/google/apis/spanner_v1/representations.rb +342 -323
  214. data/generated/google/apis/spanner_v1/service.rb +502 -492
  215. data/generated/google/apis/speech_v1beta1.rb +1 -1
  216. data/generated/google/apis/speech_v1beta1/classes.rb +244 -244
  217. data/generated/google/apis/speech_v1beta1/representations.rb +52 -52
  218. data/generated/google/apis/speech_v1beta1/service.rb +91 -91
  219. data/generated/google/apis/storage_v1.rb +1 -1
  220. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  221. data/generated/google/apis/storagetransfer_v1/classes.rb +784 -781
  222. data/generated/google/apis/storagetransfer_v1/representations.rb +88 -88
  223. data/generated/google/apis/storagetransfer_v1/service.rb +154 -154
  224. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  225. data/generated/google/apis/toolresults_v1beta3/classes.rb +90 -1
  226. data/generated/google/apis/toolresults_v1beta3/representations.rb +18 -0
  227. data/generated/google/apis/translate_v2/classes.rb +107 -107
  228. data/generated/google/apis/translate_v2/representations.rb +49 -49
  229. data/generated/google/apis/translate_v2/service.rb +81 -81
  230. data/generated/google/apis/vision_v1.rb +4 -1
  231. data/generated/google/apis/vision_v1/classes.rb +527 -527
  232. data/generated/google/apis/vision_v1/representations.rb +115 -115
  233. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  234. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  235. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  236. data/generated/google/apis/youtubereporting_v1/classes.rb +124 -124
  237. data/generated/google/apis/youtubereporting_v1/representations.rb +30 -30
  238. data/generated/google/apis/youtubereporting_v1/service.rb +113 -113
  239. data/lib/google/apis/version.rb +1 -1
  240. data/samples/cli/lib/samples/analytics.rb +2 -2
  241. metadata +2 -2
@@ -27,7 +27,10 @@ module Google
27
27
  # @see https://cloud.google.com/vision/
28
28
  module VisionV1
29
29
  VERSION = 'V1'
30
- REVISION = '20170606'
30
+ REVISION = '20170706'
31
+
32
+ # Apply machine learning models to understand and label images
33
+ AUTH_CLOUD_VISION = 'https://www.googleapis.com/auth/cloud-vision'
31
34
 
32
35
  # View and manage your data across Google Cloud Platform services
33
36
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -22,6 +22,237 @@ module Google
22
22
  module Apis
23
23
  module VisionV1
24
24
 
25
+ # Represents a color in the RGBA color space. This representation is designed
26
+ # for simplicity of conversion to/from color representations in various
27
+ # languages over compactness; for example, the fields of this representation
28
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30
+ # method in iOS; and, with just a little work, it can be easily formatted into
31
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32
+ # Example (Java):
33
+ # import com.google.type.Color;
34
+ # // ...
35
+ # public static java.awt.Color fromProto(Color protocolor) `
36
+ # float alpha = protocolor.hasAlpha()
37
+ # ? protocolor.getAlpha().getValue()
38
+ # : 1.0;
39
+ # return new java.awt.Color(
40
+ # protocolor.getRed(),
41
+ # protocolor.getGreen(),
42
+ # protocolor.getBlue(),
43
+ # alpha);
44
+ # `
45
+ # public static Color toProto(java.awt.Color color) `
46
+ # float red = (float) color.getRed();
47
+ # float green = (float) color.getGreen();
48
+ # float blue = (float) color.getBlue();
49
+ # float denominator = 255.0;
50
+ # Color.Builder resultBuilder =
51
+ # Color
52
+ # .newBuilder()
53
+ # .setRed(red / denominator)
54
+ # .setGreen(green / denominator)
55
+ # .setBlue(blue / denominator);
56
+ # int alpha = color.getAlpha();
57
+ # if (alpha != 255) `
58
+ # result.setAlpha(
59
+ # FloatValue
60
+ # .newBuilder()
61
+ # .setValue(((float) alpha) / denominator)
62
+ # .build());
63
+ # `
64
+ # return resultBuilder.build();
65
+ # `
66
+ # // ...
67
+ # Example (iOS / Obj-C):
68
+ # // ...
69
+ # static UIColor* fromProto(Color* protocolor) `
70
+ # float red = [protocolor red];
71
+ # float green = [protocolor green];
72
+ # float blue = [protocolor blue];
73
+ # FloatValue* alpha_wrapper = [protocolor alpha];
74
+ # float alpha = 1.0;
75
+ # if (alpha_wrapper != nil) `
76
+ # alpha = [alpha_wrapper value];
77
+ # `
78
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
79
+ # `
80
+ # static Color* toProto(UIColor* color) `
81
+ # CGFloat red, green, blue, alpha;
82
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
83
+ # return nil;
84
+ # `
85
+ # Color* result = [Color alloc] init];
86
+ # [result setRed:red];
87
+ # [result setGreen:green];
88
+ # [result setBlue:blue];
89
+ # if (alpha <= 0.9999) `
90
+ # [result setAlpha:floatWrapperWithValue(alpha)];
91
+ # `
92
+ # [result autorelease];
93
+ # return result;
94
+ # `
95
+ # // ...
96
+ # Example (JavaScript):
97
+ # // ...
98
+ # var protoToCssColor = function(rgb_color) `
99
+ # var redFrac = rgb_color.red || 0.0;
100
+ # var greenFrac = rgb_color.green || 0.0;
101
+ # var blueFrac = rgb_color.blue || 0.0;
102
+ # var red = Math.floor(redFrac * 255);
103
+ # var green = Math.floor(greenFrac * 255);
104
+ # var blue = Math.floor(blueFrac * 255);
105
+ # if (!('alpha' in rgb_color)) `
106
+ # return rgbToCssColor_(red, green, blue);
107
+ # `
108
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
109
+ # var rgbParams = [red, green, blue].join(',');
110
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
111
+ # `;
112
+ # var rgbToCssColor_ = function(red, green, blue) `
113
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
114
+ # var hexString = rgbNumber.toString(16);
115
+ # var missingZeros = 6 - hexString.length;
116
+ # var resultBuilder = ['#'];
117
+ # for (var i = 0; i < missingZeros; i++) `
118
+ # resultBuilder.push('0');
119
+ # `
120
+ # resultBuilder.push(hexString);
121
+ # return resultBuilder.join('');
122
+ # `;
123
+ # // ...
124
+ class Color
125
+ include Google::Apis::Core::Hashable
126
+
127
+ # The amount of red in the color as a value in the interval [0, 1].
128
+ # Corresponds to the JSON property `red`
129
+ # @return [Float]
130
+ attr_accessor :red
131
+
132
+ # The fraction of this color that should be applied to the pixel. That is,
133
+ # the final pixel color is defined by the equation:
134
+ # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
135
+ # This means that a value of 1.0 corresponds to a solid color, whereas
136
+ # a value of 0.0 corresponds to a completely transparent color. This
137
+ # uses a wrapper message rather than a simple float scalar so that it is
138
+ # possible to distinguish between a default value and the value being unset.
139
+ # If omitted, this color object is to be rendered as a solid color
140
+ # (as if the alpha value had been explicitly given with a value of 1.0).
141
+ # Corresponds to the JSON property `alpha`
142
+ # @return [Float]
143
+ attr_accessor :alpha
144
+
145
+ # The amount of blue in the color as a value in the interval [0, 1].
146
+ # Corresponds to the JSON property `blue`
147
+ # @return [Float]
148
+ attr_accessor :blue
149
+
150
+ # The amount of green in the color as a value in the interval [0, 1].
151
+ # Corresponds to the JSON property `green`
152
+ # @return [Float]
153
+ attr_accessor :green
154
+
155
+ def initialize(**args)
156
+ update!(**args)
157
+ end
158
+
159
+ # Update properties of this object
160
+ def update!(**args)
161
+ @red = args[:red] if args.key?(:red)
162
+ @alpha = args[:alpha] if args.key?(:alpha)
163
+ @blue = args[:blue] if args.key?(:blue)
164
+ @green = args[:green] if args.key?(:green)
165
+ end
166
+ end
167
+
168
+ # Users describe the type of Google Cloud Vision API tasks to perform over
169
+ # images by using *Feature*s. Each Feature indicates a type of image
170
+ # detection task to perform. Features encode the Cloud Vision API
171
+ # vertical to operate on and the number of top-scoring results to return.
172
+ class Feature
173
+ include Google::Apis::Core::Hashable
174
+
175
+ # Maximum number of results of this type.
176
+ # Corresponds to the JSON property `maxResults`
177
+ # @return [Fixnum]
178
+ attr_accessor :max_results
179
+
180
+ # The feature type.
181
+ # Corresponds to the JSON property `type`
182
+ # @return [String]
183
+ attr_accessor :type
184
+
185
+ def initialize(**args)
186
+ update!(**args)
187
+ end
188
+
189
+ # Update properties of this object
190
+ def update!(**args)
191
+ @max_results = args[:max_results] if args.key?(:max_results)
192
+ @type = args[:type] if args.key?(:type)
193
+ end
194
+ end
195
+
196
+ # Stores image properties, such as dominant colors.
197
+ class ImageProperties
198
+ include Google::Apis::Core::Hashable
199
+
200
+ # Set of dominant colors and their corresponding scores.
201
+ # Corresponds to the JSON property `dominantColors`
202
+ # @return [Google::Apis::VisionV1::DominantColorsAnnotation]
203
+ attr_accessor :dominant_colors
204
+
205
+ def initialize(**args)
206
+ update!(**args)
207
+ end
208
+
209
+ # Update properties of this object
210
+ def update!(**args)
211
+ @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
212
+ end
213
+ end
214
+
215
+ # Set of features pertaining to the image, computed by computer vision
216
+ # methods over safe-search verticals (for example, adult, spoof, medical,
217
+ # violence).
218
+ class SafeSearchAnnotation
219
+ include Google::Apis::Core::Hashable
220
+
221
+ # Likelihood that this is a medical image.
222
+ # Corresponds to the JSON property `medical`
223
+ # @return [String]
224
+ attr_accessor :medical
225
+
226
+ # Violence likelihood.
227
+ # Corresponds to the JSON property `violence`
228
+ # @return [String]
229
+ attr_accessor :violence
230
+
231
+ # Represents the adult content likelihood for the image.
232
+ # Corresponds to the JSON property `adult`
233
+ # @return [String]
234
+ attr_accessor :adult
235
+
236
+ # Spoof likelihood. The likelihood that an modification
237
+ # was made to the image's canonical version to make it appear
238
+ # funny or offensive.
239
+ # Corresponds to the JSON property `spoof`
240
+ # @return [String]
241
+ attr_accessor :spoof
242
+
243
+ def initialize(**args)
244
+ update!(**args)
245
+ end
246
+
247
+ # Update properties of this object
248
+ def update!(**args)
249
+ @medical = args[:medical] if args.key?(:medical)
250
+ @violence = args[:violence] if args.key?(:violence)
251
+ @adult = args[:adult] if args.key?(:adult)
252
+ @spoof = args[:spoof] if args.key?(:spoof)
253
+ end
254
+ end
255
+
25
256
  # Set of dominant colors and their corresponding scores.
26
257
  class DominantColorsAnnotation
27
258
  include Google::Apis::Core::Hashable
@@ -125,28 +356,35 @@ module Google
125
356
  end
126
357
  end
127
358
 
128
- # Additional information detected on the structural component.
129
- class TextProperty
359
+ # Entity deduced from similar images on the Internet.
360
+ class WebEntity
130
361
  include Google::Apis::Core::Hashable
131
362
 
132
- # Detected start or end of a structural component.
133
- # Corresponds to the JSON property `detectedBreak`
134
- # @return [Google::Apis::VisionV1::DetectedBreak]
135
- attr_accessor :detected_break
136
-
137
- # A list of detected languages together with confidence.
138
- # Corresponds to the JSON property `detectedLanguages`
139
- # @return [Array<Google::Apis::VisionV1::DetectedLanguage>]
140
- attr_accessor :detected_languages
363
+ # Opaque entity ID.
364
+ # Corresponds to the JSON property `entityId`
365
+ # @return [String]
366
+ attr_accessor :entity_id
141
367
 
142
- def initialize(**args)
143
- update!(**args)
144
- end
368
+ # Canonical description of the entity, in English.
369
+ # Corresponds to the JSON property `description`
370
+ # @return [String]
371
+ attr_accessor :description
145
372
 
146
- # Update properties of this object
373
+ # Overall relevancy score for the entity.
374
+ # Not normalized and not comparable across different image queries.
375
+ # Corresponds to the JSON property `score`
376
+ # @return [Float]
377
+ attr_accessor :score
378
+
379
+ def initialize(**args)
380
+ update!(**args)
381
+ end
382
+
383
+ # Update properties of this object
147
384
  def update!(**args)
148
- @detected_break = args[:detected_break] if args.key?(:detected_break)
149
- @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
385
+ @entity_id = args[:entity_id] if args.key?(:entity_id)
386
+ @description = args[:description] if args.key?(:description)
387
+ @score = args[:score] if args.key?(:score)
150
388
  end
151
389
  end
152
390
 
@@ -169,25 +407,19 @@ module Google
169
407
  end
170
408
  end
171
409
 
172
- # Entity deduced from similar images on the Internet.
173
- class WebEntity
410
+ # Additional information detected on the structural component.
411
+ class TextProperty
174
412
  include Google::Apis::Core::Hashable
175
413
 
176
- # Overall relevancy score for the entity.
177
- # Not normalized and not comparable across different image queries.
178
- # Corresponds to the JSON property `score`
179
- # @return [Float]
180
- attr_accessor :score
181
-
182
- # Opaque entity ID.
183
- # Corresponds to the JSON property `entityId`
184
- # @return [String]
185
- attr_accessor :entity_id
414
+ # A list of detected languages together with confidence.
415
+ # Corresponds to the JSON property `detectedLanguages`
416
+ # @return [Array<Google::Apis::VisionV1::DetectedLanguage>]
417
+ attr_accessor :detected_languages
186
418
 
187
- # Canonical description of the entity, in English.
188
- # Corresponds to the JSON property `description`
189
- # @return [String]
190
- attr_accessor :description
419
+ # Detected start or end of a structural component.
420
+ # Corresponds to the JSON property `detectedBreak`
421
+ # @return [Google::Apis::VisionV1::DetectedBreak]
422
+ attr_accessor :detected_break
191
423
 
192
424
  def initialize(**args)
193
425
  update!(**args)
@@ -195,9 +427,8 @@ module Google
195
427
 
196
428
  # Update properties of this object
197
429
  def update!(**args)
198
- @score = args[:score] if args.key?(:score)
199
- @entity_id = args[:entity_id] if args.key?(:entity_id)
200
- @description = args[:description] if args.key?(:description)
430
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
431
+ @detected_break = args[:detected_break] if args.key?(:detected_break)
201
432
  end
202
433
  end
203
434
 
@@ -205,6 +436,18 @@ module Google
205
436
  class AnnotateImageResponse
206
437
  include Google::Apis::Core::Hashable
207
438
 
439
+ # If present, label detection has completed successfully.
440
+ # Corresponds to the JSON property `labelAnnotations`
441
+ # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
442
+ attr_accessor :label_annotations
443
+
444
+ # Set of features pertaining to the image, computed by computer vision
445
+ # methods over safe-search verticals (for example, adult, spoof, medical,
446
+ # violence).
447
+ # Corresponds to the JSON property `safeSearchAnnotation`
448
+ # @return [Google::Apis::VisionV1::SafeSearchAnnotation]
449
+ attr_accessor :safe_search_annotation
450
+
208
451
  # The `Status` type defines a logical error model that is suitable for different
209
452
  # programming environments, including REST APIs and RPC APIs. It is used by
210
453
  # [gRPC](https://github.com/grpc). The error model is designed to be:
@@ -269,16 +512,16 @@ module Google
269
512
  # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
270
513
  attr_accessor :text_annotations
271
514
 
272
- # If present, face detection has completed successfully.
273
- # Corresponds to the JSON property `faceAnnotations`
274
- # @return [Array<Google::Apis::VisionV1::FaceAnnotation>]
275
- attr_accessor :face_annotations
276
-
277
515
  # Stores image properties, such as dominant colors.
278
516
  # Corresponds to the JSON property `imagePropertiesAnnotation`
279
517
  # @return [Google::Apis::VisionV1::ImageProperties]
280
518
  attr_accessor :image_properties_annotation
281
519
 
520
+ # If present, face detection has completed successfully.
521
+ # Corresponds to the JSON property `faceAnnotations`
522
+ # @return [Array<Google::Apis::VisionV1::FaceAnnotation>]
523
+ attr_accessor :face_annotations
524
+
282
525
  # If present, logo detection has completed successfully.
283
526
  # Corresponds to the JSON property `logoAnnotations`
284
527
  # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
@@ -294,35 +537,23 @@ module Google
294
537
  # @return [Google::Apis::VisionV1::WebDetection]
295
538
  attr_accessor :web_detection
296
539
 
297
- # If present, label detection has completed successfully.
298
- # Corresponds to the JSON property `labelAnnotations`
299
- # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
300
- attr_accessor :label_annotations
301
-
302
- # Set of features pertaining to the image, computed by computer vision
303
- # methods over safe-search verticals (for example, adult, spoof, medical,
304
- # violence).
305
- # Corresponds to the JSON property `safeSearchAnnotation`
306
- # @return [Google::Apis::VisionV1::SafeSearchAnnotation]
307
- attr_accessor :safe_search_annotation
308
-
309
540
  def initialize(**args)
310
541
  update!(**args)
311
542
  end
312
543
 
313
544
  # Update properties of this object
314
545
  def update!(**args)
546
+ @label_annotations = args[:label_annotations] if args.key?(:label_annotations)
547
+ @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation)
315
548
  @error = args[:error] if args.key?(:error)
316
549
  @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation)
317
550
  @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations)
318
551
  @text_annotations = args[:text_annotations] if args.key?(:text_annotations)
319
- @face_annotations = args[:face_annotations] if args.key?(:face_annotations)
320
552
  @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation)
553
+ @face_annotations = args[:face_annotations] if args.key?(:face_annotations)
321
554
  @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations)
322
555
  @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation)
323
556
  @web_detection = args[:web_detection] if args.key?(:web_detection)
324
- @label_annotations = args[:label_annotations] if args.key?(:label_annotations)
325
- @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation)
326
557
  end
327
558
  end
328
559
 
@@ -387,6 +618,110 @@ module Google
387
618
  end
388
619
  end
389
620
 
621
+ # Relevant information for the image from the Internet.
622
+ class WebDetection
623
+ include Google::Apis::Core::Hashable
624
+
625
+ # Web pages containing the matching images from the Internet.
626
+ # Corresponds to the JSON property `pagesWithMatchingImages`
627
+ # @return [Array<Google::Apis::VisionV1::WebPage>]
628
+ attr_accessor :pages_with_matching_images
629
+
630
+ # The visually similar image results.
631
+ # Corresponds to the JSON property `visuallySimilarImages`
632
+ # @return [Array<Google::Apis::VisionV1::WebImage>]
633
+ attr_accessor :visually_similar_images
634
+
635
+ # Partial matching images from the Internet.
636
+ # Those images are similar enough to share some key-point features. For
637
+ # example an original image will likely have partial matching for its crops.
638
+ # Corresponds to the JSON property `partialMatchingImages`
639
+ # @return [Array<Google::Apis::VisionV1::WebImage>]
640
+ attr_accessor :partial_matching_images
641
+
642
+ # Fully matching images from the Internet.
643
+ # Can include resized copies of the query image.
644
+ # Corresponds to the JSON property `fullMatchingImages`
645
+ # @return [Array<Google::Apis::VisionV1::WebImage>]
646
+ attr_accessor :full_matching_images
647
+
648
+ # Deduced entities from similar images on the Internet.
649
+ # Corresponds to the JSON property `webEntities`
650
+ # @return [Array<Google::Apis::VisionV1::WebEntity>]
651
+ attr_accessor :web_entities
652
+
653
+ def initialize(**args)
654
+ update!(**args)
655
+ end
656
+
657
+ # Update properties of this object
658
+ def update!(**args)
659
+ @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
660
+ @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
661
+ @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
662
+ @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
663
+ @web_entities = args[:web_entities] if args.key?(:web_entities)
664
+ end
665
+ end
666
+
667
+ # Response to a batch image annotation request.
668
+ class BatchAnnotateImagesResponse
669
+ include Google::Apis::Core::Hashable
670
+
671
+ # Individual responses to image annotation requests within the batch.
672
+ # Corresponds to the JSON property `responses`
673
+ # @return [Array<Google::Apis::VisionV1::AnnotateImageResponse>]
674
+ attr_accessor :responses
675
+
676
+ def initialize(**args)
677
+ update!(**args)
678
+ end
679
+
680
+ # Update properties of this object
681
+ def update!(**args)
682
+ @responses = args[:responses] if args.key?(:responses)
683
+ end
684
+ end
685
+
686
+ # External image source (Google Cloud Storage image location).
687
+ class ImageSource
688
+ include Google::Apis::Core::Hashable
689
+
690
+ # NOTE: For new code `image_uri` below is preferred.
691
+ # Google Cloud Storage image URI, which must be in the following form:
692
+ # `gs://bucket_name/object_name` (for details, see
693
+ # [Google Cloud Storage Request
694
+ # URIs](https://cloud.google.com/storage/docs/reference-uris)).
695
+ # NOTE: Cloud Storage object versioning is not supported.
696
+ # Corresponds to the JSON property `gcsImageUri`
697
+ # @return [String]
698
+ attr_accessor :gcs_image_uri
699
+
700
+ # Image URI which supports:
701
+ # 1) Google Cloud Storage image URI, which must be in the following form:
702
+ # `gs://bucket_name/object_name` (for details, see
703
+ # [Google Cloud Storage Request
704
+ # URIs](https://cloud.google.com/storage/docs/reference-uris)).
705
+ # NOTE: Cloud Storage object versioning is not supported.
706
+ # 2) Publicly accessible image HTTP/HTTPS URL.
707
+ # This is preferred over the legacy `gcs_image_uri` above. When both
708
+ # `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
709
+ # precedence.
710
+ # Corresponds to the JSON property `imageUri`
711
+ # @return [String]
712
+ attr_accessor :image_uri
713
+
714
+ def initialize(**args)
715
+ update!(**args)
716
+ end
717
+
718
+ # Update properties of this object
719
+ def update!(**args)
720
+ @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
721
+ @image_uri = args[:image_uri] if args.key?(:image_uri)
722
+ end
723
+ end
724
+
390
725
  # A `Property` consists of a user-supplied name/value pair.
391
726
  class Property
392
727
  include Google::Apis::Core::Hashable
@@ -471,33 +806,26 @@ module Google
471
806
  end
472
807
  end
473
808
 
474
- # External image source (Google Cloud Storage image location).
475
- class ImageSource
809
+ # A 3D position in the image, used primarily for Face detection landmarks.
810
+ # A valid Position must have both x and y coordinates.
811
+ # The position coordinates are in the same scale as the original image.
812
+ class Position
476
813
  include Google::Apis::Core::Hashable
477
814
 
478
- # NOTE: For new code `image_uri` below is preferred.
479
- # Google Cloud Storage image URI, which must be in the following form:
480
- # `gs://bucket_name/object_name` (for details, see
481
- # [Google Cloud Storage Request
482
- # URIs](https://cloud.google.com/storage/docs/reference-uris)).
483
- # NOTE: Cloud Storage object versioning is not supported.
484
- # Corresponds to the JSON property `gcsImageUri`
485
- # @return [String]
486
- attr_accessor :gcs_image_uri
815
+ # Z coordinate (or depth).
816
+ # Corresponds to the JSON property `z`
817
+ # @return [Float]
818
+ attr_accessor :z
487
819
 
488
- # Image URI which supports:
489
- # 1) Google Cloud Storage image URI, which must be in the following form:
490
- # `gs://bucket_name/object_name` (for details, see
491
- # [Google Cloud Storage Request
492
- # URIs](https://cloud.google.com/storage/docs/reference-uris)).
493
- # NOTE: Cloud Storage object versioning is not supported.
494
- # 2) Publicly accessible image HTTP/HTTPS URL.
495
- # This is preferred over the legacy `gcs_image_uri` above. When both
496
- # `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
497
- # precedence.
498
- # Corresponds to the JSON property `imageUri`
499
- # @return [String]
500
- attr_accessor :image_uri
820
+ # X coordinate.
821
+ # Corresponds to the JSON property `x`
822
+ # @return [Float]
823
+ attr_accessor :x
824
+
825
+ # Y coordinate.
826
+ # Corresponds to the JSON property `y`
827
+ # @return [Float]
828
+ attr_accessor :y
501
829
 
502
830
  def initialize(**args)
503
831
  update!(**args)
@@ -505,123 +833,26 @@ module Google
505
833
 
506
834
  # Update properties of this object
507
835
  def update!(**args)
508
- @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
509
- @image_uri = args[:image_uri] if args.key?(:image_uri)
836
+ @z = args[:z] if args.key?(:z)
837
+ @x = args[:x] if args.key?(:x)
838
+ @y = args[:y] if args.key?(:y)
510
839
  end
511
840
  end
512
841
 
513
- # Response to a batch image annotation request.
514
- class BatchAnnotateImagesResponse
842
+ # Metadata for web pages.
843
+ class WebPage
515
844
  include Google::Apis::Core::Hashable
516
845
 
517
- # Individual responses to image annotation requests within the batch.
518
- # Corresponds to the JSON property `responses`
519
- # @return [Array<Google::Apis::VisionV1::AnnotateImageResponse>]
520
- attr_accessor :responses
521
-
522
- def initialize(**args)
523
- update!(**args)
524
- end
525
-
526
- # Update properties of this object
527
- def update!(**args)
528
- @responses = args[:responses] if args.key?(:responses)
529
- end
530
- end
531
-
532
- # Relevant information for the image from the Internet.
533
- class WebDetection
534
- include Google::Apis::Core::Hashable
535
-
536
- # Fully matching images from the Internet.
537
- # Can include resized copies of the query image.
538
- # Corresponds to the JSON property `fullMatchingImages`
539
- # @return [Array<Google::Apis::VisionV1::WebImage>]
540
- attr_accessor :full_matching_images
541
-
542
- # Deduced entities from similar images on the Internet.
543
- # Corresponds to the JSON property `webEntities`
544
- # @return [Array<Google::Apis::VisionV1::WebEntity>]
545
- attr_accessor :web_entities
546
-
547
- # Web pages containing the matching images from the Internet.
548
- # Corresponds to the JSON property `pagesWithMatchingImages`
549
- # @return [Array<Google::Apis::VisionV1::WebPage>]
550
- attr_accessor :pages_with_matching_images
551
-
552
- # Partial matching images from the Internet.
553
- # Those images are similar enough to share some key-point features. For
554
- # example an original image will likely have partial matching for its crops.
555
- # Corresponds to the JSON property `partialMatchingImages`
556
- # @return [Array<Google::Apis::VisionV1::WebImage>]
557
- attr_accessor :partial_matching_images
558
-
559
- # The visually similar image results.
560
- # Corresponds to the JSON property `visuallySimilarImages`
561
- # @return [Array<Google::Apis::VisionV1::WebImage>]
562
- attr_accessor :visually_similar_images
563
-
564
- def initialize(**args)
565
- update!(**args)
566
- end
567
-
568
- # Update properties of this object
569
- def update!(**args)
570
- @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
571
- @web_entities = args[:web_entities] if args.key?(:web_entities)
572
- @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
573
- @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
574
- @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
575
- end
576
- end
577
-
578
- # A 3D position in the image, used primarily for Face detection landmarks.
579
- # A valid Position must have both x and y coordinates.
580
- # The position coordinates are in the same scale as the original image.
581
- class Position
582
- include Google::Apis::Core::Hashable
583
-
584
- # Y coordinate.
585
- # Corresponds to the JSON property `y`
586
- # @return [Float]
587
- attr_accessor :y
588
-
589
- # X coordinate.
590
- # Corresponds to the JSON property `x`
591
- # @return [Float]
592
- attr_accessor :x
593
-
594
- # Z coordinate (or depth).
595
- # Corresponds to the JSON property `z`
596
- # @return [Float]
597
- attr_accessor :z
598
-
599
- def initialize(**args)
600
- update!(**args)
601
- end
602
-
603
- # Update properties of this object
604
- def update!(**args)
605
- @y = args[:y] if args.key?(:y)
606
- @x = args[:x] if args.key?(:x)
607
- @z = args[:z] if args.key?(:z)
608
- end
609
- end
610
-
611
- # Metadata for web pages.
612
- class WebPage
613
- include Google::Apis::Core::Hashable
614
-
615
- # Overall relevancy score for the web page.
616
- # Not normalized and not comparable across different image queries.
617
- # Corresponds to the JSON property `score`
618
- # @return [Float]
619
- attr_accessor :score
620
-
621
- # The result web page URL.
622
- # Corresponds to the JSON property `url`
623
- # @return [String]
624
- attr_accessor :url
846
+ # Overall relevancy score for the web page.
847
+ # Not normalized and not comparable across different image queries.
848
+ # Corresponds to the JSON property `score`
849
+ # @return [Float]
850
+ attr_accessor :score
851
+
852
+ # The result web page URL.
853
+ # Corresponds to the JSON property `url`
854
+ # @return [String]
855
+ attr_accessor :url
625
856
 
626
857
  def initialize(**args)
627
858
  update!(**args)
@@ -639,11 +870,6 @@ module Google
639
870
  class ColorInfo
640
871
  include Google::Apis::Core::Hashable
641
872
 
642
- # Image-specific score for this color. Value in range [0, 1].
643
- # Corresponds to the JSON property `score`
644
- # @return [Float]
645
- attr_accessor :score
646
-
647
873
  # The fraction of pixels the color occupies in the image.
648
874
  # Value in range [0, 1].
649
875
  # Corresponds to the JSON property `pixelFraction`
@@ -753,15 +979,20 @@ module Google
753
979
  # @return [Google::Apis::VisionV1::Color]
754
980
  attr_accessor :color
755
981
 
982
+ # Image-specific score for this color. Value in range [0, 1].
983
+ # Corresponds to the JSON property `score`
984
+ # @return [Float]
985
+ attr_accessor :score
986
+
756
987
  def initialize(**args)
757
988
  update!(**args)
758
989
  end
759
990
 
760
991
  # Update properties of this object
761
992
  def update!(**args)
762
- @score = args[:score] if args.key?(:score)
763
993
  @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction)
764
994
  @color = args[:color] if args.key?(:color)
995
+ @score = args[:score] if args.key?(:score)
765
996
  end
766
997
  end
767
998
 
@@ -795,11 +1026,6 @@ module Google
795
1026
  # @return [Google::Apis::VisionV1::BoundingPoly]
796
1027
  attr_accessor :bounding_poly
797
1028
 
798
- # Entity textual description, expressed in its `locale` language.
799
- # Corresponds to the JSON property `description`
800
- # @return [String]
801
- attr_accessor :description
802
-
803
1029
  # The relevancy of the ICA (Image Content Annotation) label to the
804
1030
  # image. For example, the relevancy of "tower" is likely higher to an image
805
1031
  # containing the detected "Eiffel Tower" than to an image containing a
@@ -809,6 +1035,11 @@ module Google
809
1035
  # @return [Float]
810
1036
  attr_accessor :topicality
811
1037
 
1038
+ # Entity textual description, expressed in its `locale` language.
1039
+ # Corresponds to the JSON property `description`
1040
+ # @return [String]
1041
+ attr_accessor :description
1042
+
812
1043
  # Some entities may have optional user-supplied `Property` (name/value)
813
1044
  # fields, such a score or string that qualifies the entity.
814
1045
  # Corresponds to the JSON property `properties`
@@ -839,8 +1070,8 @@ module Google
839
1070
  @confidence = args[:confidence] if args.key?(:confidence)
840
1071
  @locale = args[:locale] if args.key?(:locale)
841
1072
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
842
- @description = args[:description] if args.key?(:description)
843
1073
  @topicality = args[:topicality] if args.key?(:topicality)
1074
+ @description = args[:description] if args.key?(:description)
844
1075
  @properties = args[:properties] if args.key?(:properties)
845
1076
  @score = args[:score] if args.key?(:score)
846
1077
  @locations = args[:locations] if args.key?(:locations)
@@ -851,17 +1082,17 @@ module Google
851
1082
  class CropHint
852
1083
  include Google::Apis::Core::Hashable
853
1084
 
854
- # Confidence of this being a salient region. Range [0, 1].
855
- # Corresponds to the JSON property `confidence`
856
- # @return [Float]
857
- attr_accessor :confidence
858
-
859
1085
  # Fraction of importance of this salient region with respect to the original
860
1086
  # image.
861
1087
  # Corresponds to the JSON property `importanceFraction`
862
1088
  # @return [Float]
863
1089
  attr_accessor :importance_fraction
864
1090
 
1091
+ # Confidence of this being a salient region. Range [0, 1].
1092
+ # Corresponds to the JSON property `confidence`
1093
+ # @return [Float]
1094
+ attr_accessor :confidence
1095
+
865
1096
  # A bounding polygon for the detected image annotation.
866
1097
  # Corresponds to the JSON property `boundingPoly`
867
1098
  # @return [Google::Apis::VisionV1::BoundingPoly]
@@ -873,8 +1104,8 @@ module Google
873
1104
 
874
1105
  # Update properties of this object
875
1106
  def update!(**args)
876
- @confidence = args[:confidence] if args.key?(:confidence)
877
1107
  @importance_fraction = args[:importance_fraction] if args.key?(:importance_fraction)
1108
+ @confidence = args[:confidence] if args.key?(:confidence)
878
1109
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
879
1110
  end
880
1111
  end
@@ -940,11 +1171,6 @@ module Google
940
1171
  class Word
941
1172
  include Google::Apis::Core::Hashable
942
1173
 
943
- # A bounding polygon for the detected image annotation.
944
- # Corresponds to the JSON property `boundingBox`
945
- # @return [Google::Apis::VisionV1::BoundingPoly]
946
- attr_accessor :bounding_box
947
-
948
1174
  # List of symbols in the word.
949
1175
  # The order of the symbols follows the natural reading order.
950
1176
  # Corresponds to the JSON property `symbols`
@@ -956,15 +1182,20 @@ module Google
956
1182
  # @return [Google::Apis::VisionV1::TextProperty]
957
1183
  attr_accessor :property
958
1184
 
1185
+ # A bounding polygon for the detected image annotation.
1186
+ # Corresponds to the JSON property `boundingBox`
1187
+ # @return [Google::Apis::VisionV1::BoundingPoly]
1188
+ attr_accessor :bounding_box
1189
+
959
1190
  def initialize(**args)
960
1191
  update!(**args)
961
1192
  end
962
1193
 
963
1194
  # Update properties of this object
964
1195
  def update!(**args)
965
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
966
1196
  @symbols = args[:symbols] if args.key?(:symbols)
967
1197
  @property = args[:property] if args.key?(:property)
1198
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
968
1199
  end
969
1200
  end
970
1201
 
@@ -1003,6 +1234,11 @@ module Google
1003
1234
  class Image
1004
1235
  include Google::Apis::Core::Hashable
1005
1236
 
1237
+ # External image source (Google Cloud Storage image location).
1238
+ # Corresponds to the JSON property `source`
1239
+ # @return [Google::Apis::VisionV1::ImageSource]
1240
+ attr_accessor :source
1241
+
1006
1242
  # Image content, represented as a stream of bytes.
1007
1243
  # Note: as with all `bytes` fields, protobuffers use a pure binary
1008
1244
  # representation, whereas JSON representations use base64.
@@ -1011,19 +1247,14 @@ module Google
1011
1247
  # @return [String]
1012
1248
  attr_accessor :content
1013
1249
 
1014
- # External image source (Google Cloud Storage image location).
1015
- # Corresponds to the JSON property `source`
1016
- # @return [Google::Apis::VisionV1::ImageSource]
1017
- attr_accessor :source
1018
-
1019
1250
  def initialize(**args)
1020
1251
  update!(**args)
1021
1252
  end
1022
1253
 
1023
1254
  # Update properties of this object
1024
1255
  def update!(**args)
1025
- @content = args[:content] if args.key?(:content)
1026
1256
  @source = args[:source] if args.key?(:source)
1257
+ @content = args[:content] if args.key?(:content)
1027
1258
  end
1028
1259
  end
1029
1260
 
@@ -1057,20 +1288,20 @@ module Google
1057
1288
  # @return [String]
1058
1289
  attr_accessor :anger_likelihood
1059
1290
 
1060
- # Joy likelihood.
1061
- # Corresponds to the JSON property `joyLikelihood`
1062
- # @return [String]
1063
- attr_accessor :joy_likelihood
1064
-
1065
1291
  # Face landmarking confidence. Range [0, 1].
1066
1292
  # Corresponds to the JSON property `landmarkingConfidence`
1067
1293
  # @return [Float]
1068
1294
  attr_accessor :landmarking_confidence
1069
1295
 
1070
- # Detection confidence. Range [0, 1].
1071
- # Corresponds to the JSON property `detectionConfidence`
1072
- # @return [Float]
1073
- attr_accessor :detection_confidence
1296
+ # Joy likelihood.
1297
+ # Corresponds to the JSON property `joyLikelihood`
1298
+ # @return [String]
1299
+ attr_accessor :joy_likelihood
1300
+
1301
+ # Under-exposed likelihood.
1302
+ # Corresponds to the JSON property `underExposedLikelihood`
1303
+ # @return [String]
1304
+ attr_accessor :under_exposed_likelihood
1074
1305
 
1075
1306
  # Yaw angle, which indicates the leftward/rightward angle that the face is
1076
1307
  # pointing relative to the vertical plane perpendicular to the image. Range
@@ -1079,10 +1310,10 @@ module Google
1079
1310
  # @return [Float]
1080
1311
  attr_accessor :pan_angle
1081
1312
 
1082
- # Under-exposed likelihood.
1083
- # Corresponds to the JSON property `underExposedLikelihood`
1084
- # @return [String]
1085
- attr_accessor :under_exposed_likelihood
1313
+ # Detection confidence. Range [0, 1].
1314
+ # Corresponds to the JSON property `detectionConfidence`
1315
+ # @return [Float]
1316
+ attr_accessor :detection_confidence
1086
1317
 
1087
1318
  # Blurred likelihood.
1088
1319
  # Corresponds to the JSON property `blurredLikelihood`
@@ -1122,11 +1353,11 @@ module Google
1122
1353
  @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood)
1123
1354
  @landmarks = args[:landmarks] if args.key?(:landmarks)
1124
1355
  @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood)
1125
- @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
1126
1356
  @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence)
1127
- @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
1128
- @pan_angle = args[:pan_angle] if args.key?(:pan_angle)
1357
+ @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
1129
1358
  @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood)
1359
+ @pan_angle = args[:pan_angle] if args.key?(:pan_angle)
1360
+ @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
1130
1361
  @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood)
1131
1362
  @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood)
1132
1363
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
@@ -1184,6 +1415,11 @@ module Google
1184
1415
  class ImageContext
1185
1416
  include Google::Apis::Core::Hashable
1186
1417
 
1418
+ # Parameters for crop hints annotation request.
1419
+ # Corresponds to the JSON property `cropHintsParams`
1420
+ # @return [Google::Apis::VisionV1::CropHintsParams]
1421
+ attr_accessor :crop_hints_params
1422
+
1187
1423
  # List of languages to use for TEXT_DETECTION. In most cases, an empty value
1188
1424
  # yields the best results since it enables automatic language detection. For
1189
1425
  # languages based on the Latin alphabet, setting `language_hints` is not
@@ -1201,20 +1437,15 @@ module Google
1201
1437
  # @return [Google::Apis::VisionV1::LatLongRect]
1202
1438
  attr_accessor :lat_long_rect
1203
1439
 
1204
- # Parameters for crop hints annotation request.
1205
- # Corresponds to the JSON property `cropHintsParams`
1206
- # @return [Google::Apis::VisionV1::CropHintsParams]
1207
- attr_accessor :crop_hints_params
1208
-
1209
1440
  def initialize(**args)
1210
1441
  update!(**args)
1211
1442
  end
1212
1443
 
1213
1444
  # Update properties of this object
1214
1445
  def update!(**args)
1446
+ @crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params)
1215
1447
  @language_hints = args[:language_hints] if args.key?(:language_hints)
1216
1448
  @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
1217
- @crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params)
1218
1449
  end
1219
1450
  end
1220
1451
 
@@ -1222,11 +1453,6 @@ module Google
1222
1453
  class Page
1223
1454
  include Google::Apis::Core::Hashable
1224
1455
 
1225
- # Page height in pixels.
1226
- # Corresponds to the JSON property `height`
1227
- # @return [Fixnum]
1228
- attr_accessor :height
1229
-
1230
1456
  # Page width in pixels.
1231
1457
  # Corresponds to the JSON property `width`
1232
1458
  # @return [Fixnum]
@@ -1242,16 +1468,21 @@ module Google
1242
1468
  # @return [Google::Apis::VisionV1::TextProperty]
1243
1469
  attr_accessor :property
1244
1470
 
1471
+ # Page height in pixels.
1472
+ # Corresponds to the JSON property `height`
1473
+ # @return [Fixnum]
1474
+ attr_accessor :height
1475
+
1245
1476
  def initialize(**args)
1246
1477
  update!(**args)
1247
1478
  end
1248
1479
 
1249
1480
  # Update properties of this object
1250
1481
  def update!(**args)
1251
- @height = args[:height] if args.key?(:height)
1252
1482
  @width = args[:width] if args.key?(:width)
1253
1483
  @blocks = args[:blocks] if args.key?(:blocks)
1254
1484
  @property = args[:property] if args.key?(:property)
1485
+ @height = args[:height] if args.key?(:height)
1255
1486
  end
1256
1487
  end
1257
1488
 
@@ -1260,16 +1491,16 @@ module Google
1260
1491
  class AnnotateImageRequest
1261
1492
  include Google::Apis::Core::Hashable
1262
1493
 
1263
- # Client image to perform Google Cloud Vision API tasks over.
1264
- # Corresponds to the JSON property `image`
1265
- # @return [Google::Apis::VisionV1::Image]
1266
- attr_accessor :image
1267
-
1268
1494
  # Requested features.
1269
1495
  # Corresponds to the JSON property `features`
1270
1496
  # @return [Array<Google::Apis::VisionV1::Feature>]
1271
1497
  attr_accessor :features
1272
1498
 
1499
+ # Client image to perform Google Cloud Vision API tasks over.
1500
+ # Corresponds to the JSON property `image`
1501
+ # @return [Google::Apis::VisionV1::Image]
1502
+ attr_accessor :image
1503
+
1273
1504
  # Image context and/or feature-specific parameters.
1274
1505
  # Corresponds to the JSON property `imageContext`
1275
1506
  # @return [Google::Apis::VisionV1::ImageContext]
@@ -1281,8 +1512,8 @@ module Google
1281
1512
 
1282
1513
  # Update properties of this object
1283
1514
  def update!(**args)
1284
- @image = args[:image] if args.key?(:image)
1285
1515
  @features = args[:features] if args.key?(:features)
1516
+ @image = args[:image] if args.key?(:image)
1286
1517
  @image_context = args[:image_context] if args.key?(:image_context)
1287
1518
  end
1288
1519
  end
@@ -1329,12 +1560,6 @@ module Google
1329
1560
  class Status
1330
1561
  include Google::Apis::Core::Hashable
1331
1562
 
1332
- # A list of messages that carry the error details. There will be a
1333
- # common set of message types for APIs to use.
1334
- # Corresponds to the JSON property `details`
1335
- # @return [Array<Hash<String,Object>>]
1336
- attr_accessor :details
1337
-
1338
1563
  # The status code, which should be an enum value of google.rpc.Code.
1339
1564
  # Corresponds to the JSON property `code`
1340
1565
  # @return [Fixnum]
@@ -1347,51 +1572,26 @@ module Google
1347
1572
  # @return [String]
1348
1573
  attr_accessor :message
1349
1574
 
1575
+ # A list of messages that carry the error details. There is a common set of
1576
+ # message types for APIs to use.
1577
+ # Corresponds to the JSON property `details`
1578
+ # @return [Array<Hash<String,Object>>]
1579
+ attr_accessor :details
1580
+
1350
1581
  def initialize(**args)
1351
1582
  update!(**args)
1352
1583
  end
1353
1584
 
1354
1585
  # Update properties of this object
1355
1586
  def update!(**args)
1356
- @details = args[:details] if args.key?(:details)
1357
1587
  @code = args[:code] if args.key?(:code)
1358
1588
  @message = args[:message] if args.key?(:message)
1589
+ @details = args[:details] if args.key?(:details)
1359
1590
  end
1360
1591
  end
1361
1592
 
1362
- # A single symbol representation.
1363
- class Symbol
1364
- include Google::Apis::Core::Hashable
1365
-
1366
- # The actual UTF-8 representation of the symbol.
1367
- # Corresponds to the JSON property `text`
1368
- # @return [String]
1369
- attr_accessor :text
1370
-
1371
- # Additional information detected on the structural component.
1372
- # Corresponds to the JSON property `property`
1373
- # @return [Google::Apis::VisionV1::TextProperty]
1374
- attr_accessor :property
1375
-
1376
- # A bounding polygon for the detected image annotation.
1377
- # Corresponds to the JSON property `boundingBox`
1378
- # @return [Google::Apis::VisionV1::BoundingPoly]
1379
- attr_accessor :bounding_box
1380
-
1381
- def initialize(**args)
1382
- update!(**args)
1383
- end
1384
-
1385
- # Update properties of this object
1386
- def update!(**args)
1387
- @text = args[:text] if args.key?(:text)
1388
- @property = args[:property] if args.key?(:property)
1389
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1390
- end
1391
- end
1392
-
1393
- # Rectangle determined by min and max `LatLng` pairs.
1394
- class LatLongRect
1593
+ # Rectangle determined by min and max `LatLng` pairs.
1594
+ class LatLongRect
1395
1595
  include Google::Apis::Core::Hashable
1396
1596
 
1397
1597
  # An object representing a latitude/longitude pair. This is expressed as a pair
@@ -1483,6 +1683,37 @@ module Google
1483
1683
  end
1484
1684
  end
1485
1685
 
1686
+ # A single symbol representation.
1687
+ class Symbol
1688
+ include Google::Apis::Core::Hashable
1689
+
1690
+ # Additional information detected on the structural component.
1691
+ # Corresponds to the JSON property `property`
1692
+ # @return [Google::Apis::VisionV1::TextProperty]
1693
+ attr_accessor :property
1694
+
1695
+ # A bounding polygon for the detected image annotation.
1696
+ # Corresponds to the JSON property `boundingBox`
1697
+ # @return [Google::Apis::VisionV1::BoundingPoly]
1698
+ attr_accessor :bounding_box
1699
+
1700
+ # The actual UTF-8 representation of the symbol.
1701
+ # Corresponds to the JSON property `text`
1702
+ # @return [String]
1703
+ attr_accessor :text
1704
+
1705
+ def initialize(**args)
1706
+ update!(**args)
1707
+ end
1708
+
1709
+ # Update properties of this object
1710
+ def update!(**args)
1711
+ @property = args[:property] if args.key?(:property)
1712
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1713
+ @text = args[:text] if args.key?(:text)
1714
+ end
1715
+ end
1716
+
1486
1717
  # Set of crop hints that are used to generate new crops when serving images.
1487
1718
  class CropHintsAnnotation
1488
1719
  include Google::Apis::Core::Hashable
@@ -1560,237 +1791,6 @@ module Google
1560
1791
  @longitude = args[:longitude] if args.key?(:longitude)
1561
1792
  end
1562
1793
  end
1563
-
1564
- # Represents a color in the RGBA color space. This representation is designed
1565
- # for simplicity of conversion to/from color representations in various
1566
- # languages over compactness; for example, the fields of this representation
1567
- # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1568
- # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1569
- # method in iOS; and, with just a little work, it can be easily formatted into
1570
- # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1571
- # Example (Java):
1572
- # import com.google.type.Color;
1573
- # // ...
1574
- # public static java.awt.Color fromProto(Color protocolor) `
1575
- # float alpha = protocolor.hasAlpha()
1576
- # ? protocolor.getAlpha().getValue()
1577
- # : 1.0;
1578
- # return new java.awt.Color(
1579
- # protocolor.getRed(),
1580
- # protocolor.getGreen(),
1581
- # protocolor.getBlue(),
1582
- # alpha);
1583
- # `
1584
- # public static Color toProto(java.awt.Color color) `
1585
- # float red = (float) color.getRed();
1586
- # float green = (float) color.getGreen();
1587
- # float blue = (float) color.getBlue();
1588
- # float denominator = 255.0;
1589
- # Color.Builder resultBuilder =
1590
- # Color
1591
- # .newBuilder()
1592
- # .setRed(red / denominator)
1593
- # .setGreen(green / denominator)
1594
- # .setBlue(blue / denominator);
1595
- # int alpha = color.getAlpha();
1596
- # if (alpha != 255) `
1597
- # result.setAlpha(
1598
- # FloatValue
1599
- # .newBuilder()
1600
- # .setValue(((float) alpha) / denominator)
1601
- # .build());
1602
- # `
1603
- # return resultBuilder.build();
1604
- # `
1605
- # // ...
1606
- # Example (iOS / Obj-C):
1607
- # // ...
1608
- # static UIColor* fromProto(Color* protocolor) `
1609
- # float red = [protocolor red];
1610
- # float green = [protocolor green];
1611
- # float blue = [protocolor blue];
1612
- # FloatValue* alpha_wrapper = [protocolor alpha];
1613
- # float alpha = 1.0;
1614
- # if (alpha_wrapper != nil) `
1615
- # alpha = [alpha_wrapper value];
1616
- # `
1617
- # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1618
- # `
1619
- # static Color* toProto(UIColor* color) `
1620
- # CGFloat red, green, blue, alpha;
1621
- # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
1622
- # return nil;
1623
- # `
1624
- # Color* result = [Color alloc] init];
1625
- # [result setRed:red];
1626
- # [result setGreen:green];
1627
- # [result setBlue:blue];
1628
- # if (alpha <= 0.9999) `
1629
- # [result setAlpha:floatWrapperWithValue(alpha)];
1630
- # `
1631
- # [result autorelease];
1632
- # return result;
1633
- # `
1634
- # // ...
1635
- # Example (JavaScript):
1636
- # // ...
1637
- # var protoToCssColor = function(rgb_color) `
1638
- # var redFrac = rgb_color.red || 0.0;
1639
- # var greenFrac = rgb_color.green || 0.0;
1640
- # var blueFrac = rgb_color.blue || 0.0;
1641
- # var red = Math.floor(redFrac * 255);
1642
- # var green = Math.floor(greenFrac * 255);
1643
- # var blue = Math.floor(blueFrac * 255);
1644
- # if (!('alpha' in rgb_color)) `
1645
- # return rgbToCssColor_(red, green, blue);
1646
- # `
1647
- # var alphaFrac = rgb_color.alpha.value || 0.0;
1648
- # var rgbParams = [red, green, blue].join(',');
1649
- # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1650
- # `;
1651
- # var rgbToCssColor_ = function(red, green, blue) `
1652
- # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1653
- # var hexString = rgbNumber.toString(16);
1654
- # var missingZeros = 6 - hexString.length;
1655
- # var resultBuilder = ['#'];
1656
- # for (var i = 0; i < missingZeros; i++) `
1657
- # resultBuilder.push('0');
1658
- # `
1659
- # resultBuilder.push(hexString);
1660
- # return resultBuilder.join('');
1661
- # `;
1662
- # // ...
1663
- class Color
1664
- include Google::Apis::Core::Hashable
1665
-
1666
- # The amount of green in the color as a value in the interval [0, 1].
1667
- # Corresponds to the JSON property `green`
1668
- # @return [Float]
1669
- attr_accessor :green
1670
-
1671
- # The amount of blue in the color as a value in the interval [0, 1].
1672
- # Corresponds to the JSON property `blue`
1673
- # @return [Float]
1674
- attr_accessor :blue
1675
-
1676
- # The fraction of this color that should be applied to the pixel. That is,
1677
- # the final pixel color is defined by the equation:
1678
- # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1679
- # This means that a value of 1.0 corresponds to a solid color, whereas
1680
- # a value of 0.0 corresponds to a completely transparent color. This
1681
- # uses a wrapper message rather than a simple float scalar so that it is
1682
- # possible to distinguish between a default value and the value being unset.
1683
- # If omitted, this color object is to be rendered as a solid color
1684
- # (as if the alpha value had been explicitly given with a value of 1.0).
1685
- # Corresponds to the JSON property `alpha`
1686
- # @return [Float]
1687
- attr_accessor :alpha
1688
-
1689
- # The amount of red in the color as a value in the interval [0, 1].
1690
- # Corresponds to the JSON property `red`
1691
- # @return [Float]
1692
- attr_accessor :red
1693
-
1694
- def initialize(**args)
1695
- update!(**args)
1696
- end
1697
-
1698
- # Update properties of this object
1699
- def update!(**args)
1700
- @green = args[:green] if args.key?(:green)
1701
- @blue = args[:blue] if args.key?(:blue)
1702
- @alpha = args[:alpha] if args.key?(:alpha)
1703
- @red = args[:red] if args.key?(:red)
1704
- end
1705
- end
1706
-
1707
- # Stores image properties, such as dominant colors.
1708
- class ImageProperties
1709
- include Google::Apis::Core::Hashable
1710
-
1711
- # Set of dominant colors and their corresponding scores.
1712
- # Corresponds to the JSON property `dominantColors`
1713
- # @return [Google::Apis::VisionV1::DominantColorsAnnotation]
1714
- attr_accessor :dominant_colors
1715
-
1716
- def initialize(**args)
1717
- update!(**args)
1718
- end
1719
-
1720
- # Update properties of this object
1721
- def update!(**args)
1722
- @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
1723
- end
1724
- end
1725
-
1726
- # Users describe the type of Google Cloud Vision API tasks to perform over
1727
- # images by using *Feature*s. Each Feature indicates a type of image
1728
- # detection task to perform. Features encode the Cloud Vision API
1729
- # vertical to operate on and the number of top-scoring results to return.
1730
- class Feature
1731
- include Google::Apis::Core::Hashable
1732
-
1733
- # The feature type.
1734
- # Corresponds to the JSON property `type`
1735
- # @return [String]
1736
- attr_accessor :type
1737
-
1738
- # Maximum number of results of this type.
1739
- # Corresponds to the JSON property `maxResults`
1740
- # @return [Fixnum]
1741
- attr_accessor :max_results
1742
-
1743
- def initialize(**args)
1744
- update!(**args)
1745
- end
1746
-
1747
- # Update properties of this object
1748
- def update!(**args)
1749
- @type = args[:type] if args.key?(:type)
1750
- @max_results = args[:max_results] if args.key?(:max_results)
1751
- end
1752
- end
1753
-
1754
- # Set of features pertaining to the image, computed by computer vision
1755
- # methods over safe-search verticals (for example, adult, spoof, medical,
1756
- # violence).
1757
- class SafeSearchAnnotation
1758
- include Google::Apis::Core::Hashable
1759
-
1760
- # Likelihood that this is a medical image.
1761
- # Corresponds to the JSON property `medical`
1762
- # @return [String]
1763
- attr_accessor :medical
1764
-
1765
- # Violence likelihood.
1766
- # Corresponds to the JSON property `violence`
1767
- # @return [String]
1768
- attr_accessor :violence
1769
-
1770
- # Represents the adult content likelihood for the image.
1771
- # Corresponds to the JSON property `adult`
1772
- # @return [String]
1773
- attr_accessor :adult
1774
-
1775
- # Spoof likelihood. The likelihood that an modification
1776
- # was made to the image's canonical version to make it appear
1777
- # funny or offensive.
1778
- # Corresponds to the JSON property `spoof`
1779
- # @return [String]
1780
- attr_accessor :spoof
1781
-
1782
- def initialize(**args)
1783
- update!(**args)
1784
- end
1785
-
1786
- # Update properties of this object
1787
- def update!(**args)
1788
- @medical = args[:medical] if args.key?(:medical)
1789
- @violence = args[:violence] if args.key?(:violence)
1790
- @adult = args[:adult] if args.key?(:adult)
1791
- @spoof = args[:spoof] if args.key?(:spoof)
1792
- end
1793
- end
1794
1794
  end
1795
1795
  end
1796
1796
  end