google-api-client 0.25.0 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +0 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
  5. data/.github/ISSUE_TEMPLATE/support_request.md +7 -0
  6. data/.kokoro/build.bat +8 -0
  7. data/.kokoro/build.sh +36 -0
  8. data/.kokoro/common.cfg +22 -0
  9. data/.kokoro/continuous/common.cfg +20 -0
  10. data/.kokoro/continuous/linux.cfg +15 -0
  11. data/.kokoro/continuous/osx.cfg +3 -0
  12. data/.kokoro/continuous/windows.cfg +3 -0
  13. data/.kokoro/osx.sh +35 -0
  14. data/.kokoro/presubmit/common.cfg +19 -0
  15. data/.kokoro/presubmit/linux.cfg +14 -0
  16. data/.kokoro/presubmit/osx.cfg +3 -0
  17. data/.kokoro/presubmit/windows.cfg +3 -0
  18. data/.kokoro/trampoline.sh +24 -0
  19. data/.kokoro/windows.sh +32 -0
  20. data/CHANGELOG.md +83 -0
  21. data/Gemfile +2 -2
  22. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  23. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +3 -1
  24. data/generated/google/apis/alertcenter_v1beta1.rb +5 -3
  25. data/generated/google/apis/alertcenter_v1beta1/classes.rb +110 -101
  26. data/generated/google/apis/alertcenter_v1beta1/representations.rb +13 -0
  27. data/generated/google/apis/alertcenter_v1beta1/service.rb +83 -76
  28. data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
  29. data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +7 -0
  30. data/generated/google/apis/androiddeviceprovisioning_v1/representations.rb +2 -0
  31. data/generated/google/apis/androiddeviceprovisioning_v1/service.rb +1 -1
  32. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  33. data/generated/google/apis/androidenterprise_v1/classes.rb +129 -44
  34. data/generated/google/apis/androidenterprise_v1/representations.rb +48 -0
  35. data/generated/google/apis/androidenterprise_v1/service.rb +218 -0
  36. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  37. data/generated/google/apis/androidmanagement_v1/classes.rb +1 -1
  38. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  39. data/generated/google/apis/androidpublisher_v3/classes.rb +8 -0
  40. data/generated/google/apis/androidpublisher_v3/representations.rb +1 -0
  41. data/generated/google/apis/appengine_v1.rb +1 -1
  42. data/generated/google/apis/appengine_v1beta.rb +1 -1
  43. data/generated/google/apis/bigquery_v2.rb +1 -1
  44. data/generated/google/apis/bigquery_v2/classes.rb +87 -29
  45. data/generated/google/apis/bigquery_v2/representations.rb +21 -0
  46. data/generated/google/apis/bigquery_v2/service.rb +7 -9
  47. data/generated/google/apis/calendar_v3.rb +2 -2
  48. data/generated/google/apis/calendar_v3/classes.rb +14 -6
  49. data/generated/google/apis/classroom_v1.rb +1 -1
  50. data/generated/google/apis/classroom_v1/service.rb +1 -1
  51. data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
  52. data/generated/google/apis/cloudasset_v1beta1/classes.rb +14 -10
  53. data/generated/google/apis/cloudasset_v1beta1/service.rb +4 -4
  54. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  55. data/generated/google/apis/clouddebugger_v2/classes.rb +2 -2
  56. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  57. data/generated/google/apis/cloudfunctions_v1/classes.rb +2 -3
  58. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  59. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +2 -3
  60. data/generated/google/apis/cloudiot_v1.rb +1 -1
  61. data/generated/google/apis/cloudiot_v1/classes.rb +127 -0
  62. data/generated/google/apis/cloudiot_v1/representations.rb +70 -0
  63. data/generated/google/apis/cloudiot_v1/service.rb +172 -2
  64. data/generated/google/apis/cloudkms_v1.rb +1 -1
  65. data/generated/google/apis/cloudkms_v1/service.rb +107 -0
  66. data/generated/google/apis/{cloudiot_v1beta1.rb → cloudscheduler_v1beta1.rb} +8 -12
  67. data/generated/google/apis/cloudscheduler_v1beta1/classes.rb +882 -0
  68. data/generated/google/apis/cloudscheduler_v1beta1/representations.rb +264 -0
  69. data/generated/google/apis/cloudscheduler_v1beta1/service.rb +445 -0
  70. data/generated/google/apis/cloudsearch_v1.rb +1 -1
  71. data/generated/google/apis/cloudsearch_v1/classes.rb +79 -1
  72. data/generated/google/apis/cloudsearch_v1/representations.rb +44 -0
  73. data/generated/google/apis/cloudsearch_v1/service.rb +88 -3
  74. data/generated/google/apis/composer_v1.rb +1 -1
  75. data/generated/google/apis/composer_v1/classes.rb +9 -0
  76. data/generated/google/apis/composer_v1/representations.rb +1 -0
  77. data/generated/google/apis/compute_alpha.rb +1 -1
  78. data/generated/google/apis/compute_alpha/classes.rb +938 -117
  79. data/generated/google/apis/compute_alpha/representations.rb +310 -2
  80. data/generated/google/apis/compute_alpha/service.rb +1203 -245
  81. data/generated/google/apis/compute_beta.rb +1 -1
  82. data/generated/google/apis/compute_beta/classes.rb +1175 -219
  83. data/generated/google/apis/compute_beta/representations.rb +375 -2
  84. data/generated/google/apis/compute_beta/service.rb +907 -139
  85. data/generated/google/apis/compute_v1.rb +1 -1
  86. data/generated/google/apis/compute_v1/classes.rb +1485 -143
  87. data/generated/google/apis/compute_v1/representations.rb +503 -0
  88. data/generated/google/apis/compute_v1/service.rb +1375 -85
  89. data/generated/google/apis/container_v1.rb +3 -3
  90. data/generated/google/apis/container_v1/classes.rb +99 -6
  91. data/generated/google/apis/container_v1/representations.rb +39 -0
  92. data/generated/google/apis/container_v1/service.rb +2 -2
  93. data/generated/google/apis/container_v1beta1.rb +3 -3
  94. data/generated/google/apis/container_v1beta1/classes.rb +162 -9
  95. data/generated/google/apis/container_v1beta1/representations.rb +80 -0
  96. data/generated/google/apis/container_v1beta1/service.rb +3 -3
  97. data/generated/google/apis/content_v2.rb +1 -1
  98. data/generated/google/apis/content_v2/classes.rb +40 -32
  99. data/generated/google/apis/content_v2/representations.rb +0 -1
  100. data/generated/google/apis/content_v2/service.rb +3 -3
  101. data/generated/google/apis/content_v2_1.rb +35 -0
  102. data/generated/google/apis/content_v2_1/classes.rb +9104 -0
  103. data/generated/google/apis/content_v2_1/representations.rb +3967 -0
  104. data/generated/google/apis/content_v2_1/service.rb +3463 -0
  105. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  106. data/generated/google/apis/dataflow_v1b3/classes.rb +82 -0
  107. data/generated/google/apis/dataflow_v1b3/representations.rb +33 -0
  108. data/generated/google/apis/dataflow_v1b3/service.rb +97 -6
  109. data/generated/google/apis/dataproc_v1.rb +1 -1
  110. data/generated/google/apis/dataproc_v1/classes.rb +15 -1
  111. data/generated/google/apis/dataproc_v1/representations.rb +2 -0
  112. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  113. data/generated/google/apis/dataproc_v1beta2/classes.rb +125 -1
  114. data/generated/google/apis/dataproc_v1beta2/representations.rb +41 -0
  115. data/generated/google/apis/dialogflow_v2.rb +1 -1
  116. data/generated/google/apis/dialogflow_v2/classes.rb +13 -6
  117. data/generated/google/apis/dialogflow_v2/service.rb +2 -0
  118. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  119. data/generated/google/apis/dialogflow_v2beta1/classes.rb +26 -6
  120. data/generated/google/apis/dialogflow_v2beta1/representations.rb +12 -0
  121. data/generated/google/apis/dialogflow_v2beta1/service.rb +261 -12
  122. data/generated/google/apis/dlp_v2.rb +1 -1
  123. data/generated/google/apis/dlp_v2/classes.rb +4 -4
  124. data/generated/google/apis/dns_v1beta2.rb +1 -1
  125. data/generated/google/apis/dns_v1beta2/classes.rb +326 -0
  126. data/generated/google/apis/dns_v1beta2/representations.rb +149 -0
  127. data/generated/google/apis/dns_v1beta2/service.rb +246 -0
  128. data/generated/google/apis/drive_v2.rb +3 -3
  129. data/generated/google/apis/drive_v3.rb +3 -3
  130. data/generated/google/apis/driveactivity_v2.rb +37 -0
  131. data/generated/google/apis/driveactivity_v2/classes.rb +1388 -0
  132. data/generated/google/apis/driveactivity_v2/representations.rb +799 -0
  133. data/generated/google/apis/driveactivity_v2/service.rb +89 -0
  134. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  135. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +8 -1
  136. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +1 -0
  137. data/generated/google/apis/firebasehosting_v1beta1.rb +3 -2
  138. data/generated/google/apis/firebasehosting_v1beta1/classes.rb +43 -17
  139. data/generated/google/apis/firebasehosting_v1beta1/representations.rb +13 -0
  140. data/generated/google/apis/firebasehosting_v1beta1/service.rb +74 -1
  141. data/generated/google/apis/firestore_v1.rb +1 -1
  142. data/generated/google/apis/firestore_v1/classes.rb +2225 -520
  143. data/generated/google/apis/firestore_v1/representations.rb +800 -33
  144. data/generated/google/apis/firestore_v1/service.rb +526 -0
  145. data/generated/google/apis/fitness_v1.rb +1 -1
  146. data/generated/google/apis/fitness_v1/classes.rb +1 -2
  147. data/generated/google/apis/fitness_v1/service.rb +7 -3
  148. data/generated/google/apis/games_management_v1management.rb +1 -4
  149. data/generated/google/apis/games_v1.rb +1 -4
  150. data/generated/google/apis/genomics_v2alpha1.rb +1 -1
  151. data/generated/google/apis/genomics_v2alpha1/classes.rb +6 -1
  152. data/generated/google/apis/gmail_v1.rb +2 -2
  153. data/generated/google/apis/iap_v1.rb +34 -0
  154. data/generated/google/apis/iap_v1/classes.rb +308 -0
  155. data/generated/google/apis/iap_v1/representations.rb +126 -0
  156. data/generated/google/apis/iap_v1/service.rb +725 -0
  157. data/generated/google/apis/iap_v1beta1.rb +1 -1
  158. data/generated/google/apis/iap_v1beta1/classes.rb +0 -132
  159. data/generated/google/apis/iap_v1beta1/representations.rb +0 -32
  160. data/generated/google/apis/jobs_v2.rb +1 -1
  161. data/generated/google/apis/jobs_v2/classes.rb +8 -9
  162. data/generated/google/apis/jobs_v3.rb +1 -1
  163. data/generated/google/apis/jobs_v3/classes.rb +6 -6
  164. data/generated/google/apis/jobs_v3/service.rb +8 -8
  165. data/generated/google/apis/jobs_v3p1beta1.rb +1 -1
  166. data/generated/google/apis/jobs_v3p1beta1/classes.rb +9 -9
  167. data/generated/google/apis/jobs_v3p1beta1/service.rb +8 -8
  168. data/generated/google/apis/monitoring_v3.rb +1 -1
  169. data/generated/google/apis/monitoring_v3/classes.rb +20 -7
  170. data/generated/google/apis/monitoring_v3/representations.rb +1 -0
  171. data/generated/google/apis/monitoring_v3/service.rb +0 -365
  172. data/generated/google/apis/pagespeedonline_v5.rb +32 -0
  173. data/generated/google/apis/pagespeedonline_v5/classes.rb +724 -0
  174. data/generated/google/apis/pagespeedonline_v5/representations.rb +315 -0
  175. data/generated/google/apis/pagespeedonline_v5/service.rb +116 -0
  176. data/generated/google/apis/people_v1.rb +3 -3
  177. data/generated/google/apis/pubsub_v1.rb +1 -1
  178. data/generated/google/apis/pubsub_v1/classes.rb +63 -12
  179. data/generated/google/apis/pubsub_v1/representations.rb +15 -0
  180. data/generated/google/apis/pubsub_v1/service.rb +26 -18
  181. data/generated/google/apis/redis_v1.rb +2 -3
  182. data/generated/google/apis/redis_v1/service.rb +1 -2
  183. data/generated/google/apis/redis_v1beta1.rb +2 -3
  184. data/generated/google/apis/redis_v1beta1/service.rb +1 -2
  185. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  186. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +2 -2
  187. data/generated/google/apis/script_v1.rb +24 -6
  188. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  189. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +66 -1
  190. data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +30 -0
  191. data/generated/google/apis/serviceconsumermanagement_v1/service.rb +89 -0
  192. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  193. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  194. data/generated/google/apis/servicemanagement_v1/classes.rb +7 -0
  195. data/generated/google/apis/servicemanagement_v1/representations.rb +1 -0
  196. data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
  197. data/generated/google/apis/servicenetworking_v1beta/classes.rb +84 -37
  198. data/generated/google/apis/servicenetworking_v1beta/representations.rb +15 -0
  199. data/generated/google/apis/servicenetworking_v1beta/service.rb +132 -43
  200. data/generated/google/apis/serviceusage_v1.rb +1 -1
  201. data/generated/google/apis/serviceusage_v1/classes.rb +1 -1
  202. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  203. data/generated/google/apis/serviceusage_v1beta1/classes.rb +1 -1
  204. data/generated/google/apis/sheets_v4.rb +4 -4
  205. data/generated/google/apis/slides_v1.rb +4 -4
  206. data/generated/google/apis/slides_v1/classes.rb +187 -2
  207. data/generated/google/apis/slides_v1/representations.rb +67 -0
  208. data/generated/google/apis/slides_v1/service.rb +4 -3
  209. data/generated/google/apis/sourcerepo_v1.rb +2 -2
  210. data/generated/google/apis/sourcerepo_v1/service.rb +1 -1
  211. data/generated/google/apis/speech_v1.rb +1 -1
  212. data/generated/google/apis/speech_v1/classes.rb +58 -10
  213. data/generated/google/apis/speech_v1/representations.rb +29 -1
  214. data/generated/google/apis/{speech_v1beta1.rb → speech_v1p1beta1.rb} +6 -6
  215. data/generated/google/apis/speech_v1p1beta1/classes.rb +922 -0
  216. data/generated/google/apis/speech_v1p1beta1/representations.rb +294 -0
  217. data/generated/google/apis/{speech_v1beta1 → speech_v1p1beta1}/service.rb +33 -35
  218. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  219. data/generated/google/apis/sqladmin_v1beta4/classes.rb +64 -3
  220. data/generated/google/apis/sqladmin_v1beta4/representations.rb +31 -0
  221. data/generated/google/apis/storage_v1.rb +1 -1
  222. data/generated/google/apis/storage_v1/classes.rb +54 -0
  223. data/generated/google/apis/storage_v1/representations.rb +31 -0
  224. data/generated/google/apis/streetviewpublish_v1.rb +1 -1
  225. data/generated/google/apis/streetviewpublish_v1/classes.rb +26 -0
  226. data/generated/google/apis/streetviewpublish_v1/representations.rb +4 -0
  227. data/generated/google/apis/streetviewpublish_v1/service.rb +29 -3
  228. data/generated/google/apis/tasks_v1.rb +1 -1
  229. data/generated/google/apis/testing_v1.rb +1 -1
  230. data/generated/google/apis/testing_v1/classes.rb +49 -19
  231. data/generated/google/apis/testing_v1/representations.rb +20 -2
  232. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  233. data/generated/google/apis/toolresults_v1beta3/classes.rb +77 -70
  234. data/generated/google/apis/vault_v1.rb +1 -1
  235. data/generated/google/apis/vault_v1/classes.rb +78 -7
  236. data/generated/google/apis/vault_v1/representations.rb +34 -1
  237. data/generated/google/apis/vault_v1/service.rb +141 -0
  238. data/generated/google/apis/vision_v1.rb +1 -1
  239. data/generated/google/apis/vision_v1/classes.rb +33 -0
  240. data/generated/google/apis/vision_v1/representations.rb +16 -0
  241. data/generated/google/apis/vision_v1/service.rb +2 -2
  242. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  243. data/generated/google/apis/vision_v1p1beta1/classes.rb +33 -0
  244. data/generated/google/apis/vision_v1p1beta1/representations.rb +16 -0
  245. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  246. data/generated/google/apis/vision_v1p2beta1/classes.rb +33 -0
  247. data/generated/google/apis/vision_v1p2beta1/representations.rb +16 -0
  248. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  249. data/google-api-client.gemspec +1 -1
  250. data/lib/google/api_client/auth/installed_app.rb +17 -2
  251. data/lib/google/api_client/client_secrets.rb +1 -1
  252. data/lib/google/apis/core/download.rb +2 -2
  253. data/lib/google/apis/errors.rb +9 -0
  254. data/lib/google/apis/generator/annotator.rb +2 -2
  255. data/lib/google/apis/version.rb +1 -1
  256. metadata +46 -17
  257. data/generated/google/apis/cloudiot_v1beta1/classes.rb +0 -959
  258. data/generated/google/apis/cloudiot_v1beta1/representations.rb +0 -375
  259. data/generated/google/apis/cloudiot_v1beta1/service.rb +0 -618
  260. data/generated/google/apis/dfareporting_v3_0.rb +0 -40
  261. data/generated/google/apis/dfareporting_v3_0/classes.rb +0 -12119
  262. data/generated/google/apis/dfareporting_v3_0/representations.rb +0 -4336
  263. data/generated/google/apis/dfareporting_v3_0/service.rb +0 -8701
  264. data/generated/google/apis/speech_v1beta1/classes.rb +0 -480
  265. data/generated/google/apis/speech_v1beta1/representations.rb +0 -194
@@ -1,480 +0,0 @@
1
- # Copyright 2015 Google Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- require 'date'
16
- require 'google/apis/core/base_service'
17
- require 'google/apis/core/json_representation'
18
- require 'google/apis/core/hashable'
19
- require 'google/apis/errors'
20
-
21
- module Google
22
- module Apis
23
- module SpeechV1beta1
24
-
25
- # The top-level message sent by the client for the `AsyncRecognize` method.
26
- class AsyncRecognizeRequest
27
- include Google::Apis::Core::Hashable
28
-
29
- # Contains audio data in the encoding specified in the `RecognitionConfig`.
30
- # Either `content` or `uri` must be supplied. Supplying both or neither
31
- # returns google.rpc.Code.INVALID_ARGUMENT. See
32
- # [audio limits](https://cloud.google.com/speech/limits#content).
33
- # Corresponds to the JSON property `audio`
34
- # @return [Google::Apis::SpeechV1beta1::RecognitionAudio]
35
- attr_accessor :audio
36
-
37
- # Provides information to the recognizer that specifies how to process the
38
- # request.
39
- # Corresponds to the JSON property `config`
40
- # @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
41
- attr_accessor :config
42
-
43
- def initialize(**args)
44
- update!(**args)
45
- end
46
-
47
- # Update properties of this object
48
- def update!(**args)
49
- @audio = args[:audio] if args.key?(:audio)
50
- @config = args[:config] if args.key?(:config)
51
- end
52
- end
53
-
54
- # The response message for Operations.ListOperations.
55
- class ListOperationsResponse
56
- include Google::Apis::Core::Hashable
57
-
58
- # The standard List next-page token.
59
- # Corresponds to the JSON property `nextPageToken`
60
- # @return [String]
61
- attr_accessor :next_page_token
62
-
63
- # A list of operations that matches the specified filter in the request.
64
- # Corresponds to the JSON property `operations`
65
- # @return [Array<Google::Apis::SpeechV1beta1::Operation>]
66
- attr_accessor :operations
67
-
68
- def initialize(**args)
69
- update!(**args)
70
- end
71
-
72
- # Update properties of this object
73
- def update!(**args)
74
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
75
- @operations = args[:operations] if args.key?(:operations)
76
- end
77
- end
78
-
79
- # This resource represents a long-running operation that is the result of a
80
- # network API call.
81
- class Operation
82
- include Google::Apis::Core::Hashable
83
-
84
- # If the value is `false`, it means the operation is still in progress.
85
- # If `true`, the operation is completed, and either `error` or `response` is
86
- # available.
87
- # Corresponds to the JSON property `done`
88
- # @return [Boolean]
89
- attr_accessor :done
90
- alias_method :done?, :done
91
-
92
- # The `Status` type defines a logical error model that is suitable for different
93
- # programming environments, including REST APIs and RPC APIs. It is used by
94
- # [gRPC](https://github.com/grpc). The error model is designed to be:
95
- # - Simple to use and understand for most users
96
- # - Flexible enough to meet unexpected needs
97
- # # Overview
98
- # The `Status` message contains three pieces of data: error code, error message,
99
- # and error details. The error code should be an enum value of
100
- # google.rpc.Code, but it may accept additional error codes if needed. The
101
- # error message should be a developer-facing English message that helps
102
- # developers *understand* and *resolve* the error. If a localized user-facing
103
- # error message is needed, put the localized message in the error details or
104
- # localize it in the client. The optional error details may contain arbitrary
105
- # information about the error. There is a predefined set of error detail types
106
- # in the package `google.rpc` that can be used for common error conditions.
107
- # # Language mapping
108
- # The `Status` message is the logical representation of the error model, but it
109
- # is not necessarily the actual wire format. When the `Status` message is
110
- # exposed in different client libraries and different wire protocols, it can be
111
- # mapped differently. For example, it will likely be mapped to some exceptions
112
- # in Java, but more likely mapped to some error codes in C.
113
- # # Other uses
114
- # The error model and the `Status` message can be used in a variety of
115
- # environments, either with or without APIs, to provide a
116
- # consistent developer experience across different environments.
117
- # Example uses of this error model include:
118
- # - Partial errors. If a service needs to return partial errors to the client,
119
- # it may embed the `Status` in the normal response to indicate the partial
120
- # errors.
121
- # - Workflow errors. A typical workflow has multiple steps. Each step may
122
- # have a `Status` message for error reporting.
123
- # - Batch operations. If a client uses batch request and batch response, the
124
- # `Status` message should be used directly inside batch response, one for
125
- # each error sub-response.
126
- # - Asynchronous operations. If an API call embeds asynchronous operation
127
- # results in its response, the status of those operations should be
128
- # represented directly using the `Status` message.
129
- # - Logging. If some API errors are stored in logs, the message `Status` could
130
- # be used directly after any stripping needed for security/privacy reasons.
131
- # Corresponds to the JSON property `error`
132
- # @return [Google::Apis::SpeechV1beta1::Status]
133
- attr_accessor :error
134
-
135
- # Service-specific metadata associated with the operation. It typically
136
- # contains progress information and common metadata such as create time.
137
- # Some services might not provide such metadata. Any method that returns a
138
- # long-running operation should document the metadata type, if any.
139
- # Corresponds to the JSON property `metadata`
140
- # @return [Hash<String,Object>]
141
- attr_accessor :metadata
142
-
143
- # The server-assigned name, which is only unique within the same service that
144
- # originally returns it. If you use the default HTTP mapping, the
145
- # `name` should have the format of `operations/some/unique/name`.
146
- # Corresponds to the JSON property `name`
147
- # @return [String]
148
- attr_accessor :name
149
-
150
- # The normal response of the operation in case of success. If the original
151
- # method returns no data on success, such as `Delete`, the response is
152
- # `google.protobuf.Empty`. If the original method is standard
153
- # `Get`/`Create`/`Update`, the response should be the resource. For other
154
- # methods, the response should have the type `XxxResponse`, where `Xxx`
155
- # is the original method name. For example, if the original method name
156
- # is `TakeSnapshot()`, the inferred response type is
157
- # `TakeSnapshotResponse`.
158
- # Corresponds to the JSON property `response`
159
- # @return [Hash<String,Object>]
160
- attr_accessor :response
161
-
162
- def initialize(**args)
163
- update!(**args)
164
- end
165
-
166
- # Update properties of this object
167
- def update!(**args)
168
- @done = args[:done] if args.key?(:done)
169
- @error = args[:error] if args.key?(:error)
170
- @metadata = args[:metadata] if args.key?(:metadata)
171
- @name = args[:name] if args.key?(:name)
172
- @response = args[:response] if args.key?(:response)
173
- end
174
- end
175
-
176
- # Contains audio data in the encoding specified in the `RecognitionConfig`.
177
- # Either `content` or `uri` must be supplied. Supplying both or neither
178
- # returns google.rpc.Code.INVALID_ARGUMENT. See
179
- # [audio limits](https://cloud.google.com/speech/limits#content).
180
- class RecognitionAudio
181
- include Google::Apis::Core::Hashable
182
-
183
- # The audio data bytes encoded as specified in
184
- # `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
185
- # pure binary representation, whereas JSON representations use base64.
186
- # Corresponds to the JSON property `content`
187
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
188
- # @return [String]
189
- attr_accessor :content
190
-
191
- # URI that points to a file that contains audio data bytes as specified in
192
- # `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
193
- # supported, which must be specified in the following format:
194
- # `gs://bucket_name/object_name` (other URI formats return
195
- # google.rpc.Code.INVALID_ARGUMENT). For more information, see
196
- # [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
197
- # Corresponds to the JSON property `uri`
198
- # @return [String]
199
- attr_accessor :uri
200
-
201
- def initialize(**args)
202
- update!(**args)
203
- end
204
-
205
- # Update properties of this object
206
- def update!(**args)
207
- @content = args[:content] if args.key?(:content)
208
- @uri = args[:uri] if args.key?(:uri)
209
- end
210
- end
211
-
212
- # Provides information to the recognizer that specifies how to process the
213
- # request.
214
- class RecognitionConfig
215
- include Google::Apis::Core::Hashable
216
-
217
- # *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
218
- # Corresponds to the JSON property `encoding`
219
- # @return [String]
220
- attr_accessor :encoding
221
-
222
- # *Optional* The language of the supplied audio as a BCP-47 language tag.
223
- # Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt
224
- # If omitted, defaults to "en-US". See
225
- # [Language Support](https://cloud.google.com/speech/docs/languages)
226
- # for a list of the currently supported language codes.
227
- # Corresponds to the JSON property `languageCode`
228
- # @return [String]
229
- attr_accessor :language_code
230
-
231
- # *Optional* Maximum number of recognition hypotheses to be returned.
232
- # Specifically, the maximum number of `SpeechRecognitionAlternative` messages
233
- # within each `SpeechRecognitionResult`.
234
- # The server may return fewer than `max_alternatives`.
235
- # Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
236
- # one. If omitted, will return a maximum of one.
237
- # Corresponds to the JSON property `maxAlternatives`
238
- # @return [Fixnum]
239
- attr_accessor :max_alternatives
240
-
241
- # *Optional* If set to `true`, the server will attempt to filter out
242
- # profanities, replacing all but the initial character in each filtered word
243
- # with asterisks, e.g. "f***". If set to `false` or omitted, profanities
244
- # won't be filtered out.
245
- # Corresponds to the JSON property `profanityFilter`
246
- # @return [Boolean]
247
- attr_accessor :profanity_filter
248
- alias_method :profanity_filter?, :profanity_filter
249
-
250
- # *Required* Sample rate in Hertz of the audio data sent in all
251
- # `RecognitionAudio` messages. Valid values are: 8000-48000.
252
- # 16000 is optimal. For best results, set the sampling rate of the audio
253
- # source to 16000 Hz. If that's not possible, use the native sample rate of
254
- # the audio source (instead of re-sampling).
255
- # Corresponds to the JSON property `sampleRate`
256
- # @return [Fixnum]
257
- attr_accessor :sample_rate
258
-
259
- # Provides "hints" to the speech recognizer to favor specific words and phrases
260
- # in the results.
261
- # Corresponds to the JSON property `speechContext`
262
- # @return [Google::Apis::SpeechV1beta1::SpeechContext]
263
- attr_accessor :speech_context
264
-
265
- def initialize(**args)
266
- update!(**args)
267
- end
268
-
269
- # Update properties of this object
270
- def update!(**args)
271
- @encoding = args[:encoding] if args.key?(:encoding)
272
- @language_code = args[:language_code] if args.key?(:language_code)
273
- @max_alternatives = args[:max_alternatives] if args.key?(:max_alternatives)
274
- @profanity_filter = args[:profanity_filter] if args.key?(:profanity_filter)
275
- @sample_rate = args[:sample_rate] if args.key?(:sample_rate)
276
- @speech_context = args[:speech_context] if args.key?(:speech_context)
277
- end
278
- end
279
-
280
- # Provides "hints" to the speech recognizer to favor specific words and phrases
281
- # in the results.
282
- class SpeechContext
283
- include Google::Apis::Core::Hashable
284
-
285
- # *Optional* A list of strings containing words and phrases "hints" so that
286
- # the speech recognition is more likely to recognize them. This can be used
287
- # to improve the accuracy for specific words and phrases, for example, if
288
- # specific commands are typically spoken by the user. This can also be used
289
- # to add additional words to the vocabulary of the recognizer. See
290
- # [usage limits](https://cloud.google.com/speech/limits#content).
291
- # Corresponds to the JSON property `phrases`
292
- # @return [Array<String>]
293
- attr_accessor :phrases
294
-
295
- def initialize(**args)
296
- update!(**args)
297
- end
298
-
299
- # Update properties of this object
300
- def update!(**args)
301
- @phrases = args[:phrases] if args.key?(:phrases)
302
- end
303
- end
304
-
305
- # Alternative hypotheses (a.k.a. n-best list).
306
- class SpeechRecognitionAlternative
307
- include Google::Apis::Core::Hashable
308
-
309
- # *Output-only* The confidence estimate between 0.0 and 1.0. A higher number
310
- # indicates an estimated greater likelihood that the recognized words are
311
- # correct. This field is typically provided only for the top hypothesis, and
312
- # only for `is_final=true` results. Clients should not rely on the
313
- # `confidence` field as it is not guaranteed to be accurate, or even set, in
314
- # any of the results.
315
- # The default of 0.0 is a sentinel value indicating `confidence` was not set.
316
- # Corresponds to the JSON property `confidence`
317
- # @return [Float]
318
- attr_accessor :confidence
319
-
320
- # *Output-only* Transcript text representing the words that the user spoke.
321
- # Corresponds to the JSON property `transcript`
322
- # @return [String]
323
- attr_accessor :transcript
324
-
325
- def initialize(**args)
326
- update!(**args)
327
- end
328
-
329
- # Update properties of this object
330
- def update!(**args)
331
- @confidence = args[:confidence] if args.key?(:confidence)
332
- @transcript = args[:transcript] if args.key?(:transcript)
333
- end
334
- end
335
-
336
- # A speech recognition result corresponding to a portion of the audio.
337
- class SpeechRecognitionResult
338
- include Google::Apis::Core::Hashable
339
-
340
- # *Output-only* May contain one or more recognition hypotheses (up to the
341
- # maximum specified in `max_alternatives`).
342
- # Corresponds to the JSON property `alternatives`
343
- # @return [Array<Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative>]
344
- attr_accessor :alternatives
345
-
346
- def initialize(**args)
347
- update!(**args)
348
- end
349
-
350
- # Update properties of this object
351
- def update!(**args)
352
- @alternatives = args[:alternatives] if args.key?(:alternatives)
353
- end
354
- end
355
-
356
- # The `Status` type defines a logical error model that is suitable for different
357
- # programming environments, including REST APIs and RPC APIs. It is used by
358
- # [gRPC](https://github.com/grpc). The error model is designed to be:
359
- # - Simple to use and understand for most users
360
- # - Flexible enough to meet unexpected needs
361
- # # Overview
362
- # The `Status` message contains three pieces of data: error code, error message,
363
- # and error details. The error code should be an enum value of
364
- # google.rpc.Code, but it may accept additional error codes if needed. The
365
- # error message should be a developer-facing English message that helps
366
- # developers *understand* and *resolve* the error. If a localized user-facing
367
- # error message is needed, put the localized message in the error details or
368
- # localize it in the client. The optional error details may contain arbitrary
369
- # information about the error. There is a predefined set of error detail types
370
- # in the package `google.rpc` that can be used for common error conditions.
371
- # # Language mapping
372
- # The `Status` message is the logical representation of the error model, but it
373
- # is not necessarily the actual wire format. When the `Status` message is
374
- # exposed in different client libraries and different wire protocols, it can be
375
- # mapped differently. For example, it will likely be mapped to some exceptions
376
- # in Java, but more likely mapped to some error codes in C.
377
- # # Other uses
378
- # The error model and the `Status` message can be used in a variety of
379
- # environments, either with or without APIs, to provide a
380
- # consistent developer experience across different environments.
381
- # Example uses of this error model include:
382
- # - Partial errors. If a service needs to return partial errors to the client,
383
- # it may embed the `Status` in the normal response to indicate the partial
384
- # errors.
385
- # - Workflow errors. A typical workflow has multiple steps. Each step may
386
- # have a `Status` message for error reporting.
387
- # - Batch operations. If a client uses batch request and batch response, the
388
- # `Status` message should be used directly inside batch response, one for
389
- # each error sub-response.
390
- # - Asynchronous operations. If an API call embeds asynchronous operation
391
- # results in its response, the status of those operations should be
392
- # represented directly using the `Status` message.
393
- # - Logging. If some API errors are stored in logs, the message `Status` could
394
- # be used directly after any stripping needed for security/privacy reasons.
395
- class Status
396
- include Google::Apis::Core::Hashable
397
-
398
- # The status code, which should be an enum value of google.rpc.Code.
399
- # Corresponds to the JSON property `code`
400
- # @return [Fixnum]
401
- attr_accessor :code
402
-
403
- # A list of messages that carry the error details. There is a common set of
404
- # message types for APIs to use.
405
- # Corresponds to the JSON property `details`
406
- # @return [Array<Hash<String,Object>>]
407
- attr_accessor :details
408
-
409
- # A developer-facing error message, which should be in English. Any
410
- # user-facing error message should be localized and sent in the
411
- # google.rpc.Status.details field, or localized by the client.
412
- # Corresponds to the JSON property `message`
413
- # @return [String]
414
- attr_accessor :message
415
-
416
- def initialize(**args)
417
- update!(**args)
418
- end
419
-
420
- # Update properties of this object
421
- def update!(**args)
422
- @code = args[:code] if args.key?(:code)
423
- @details = args[:details] if args.key?(:details)
424
- @message = args[:message] if args.key?(:message)
425
- end
426
- end
427
-
428
- # The top-level message sent by the client for the `SyncRecognize` method.
429
- class SyncRecognizeRequest
430
- include Google::Apis::Core::Hashable
431
-
432
- # Contains audio data in the encoding specified in the `RecognitionConfig`.
433
- # Either `content` or `uri` must be supplied. Supplying both or neither
434
- # returns google.rpc.Code.INVALID_ARGUMENT. See
435
- # [audio limits](https://cloud.google.com/speech/limits#content).
436
- # Corresponds to the JSON property `audio`
437
- # @return [Google::Apis::SpeechV1beta1::RecognitionAudio]
438
- attr_accessor :audio
439
-
440
- # Provides information to the recognizer that specifies how to process the
441
- # request.
442
- # Corresponds to the JSON property `config`
443
- # @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
444
- attr_accessor :config
445
-
446
- def initialize(**args)
447
- update!(**args)
448
- end
449
-
450
- # Update properties of this object
451
- def update!(**args)
452
- @audio = args[:audio] if args.key?(:audio)
453
- @config = args[:config] if args.key?(:config)
454
- end
455
- end
456
-
457
- # The only message returned to the client by `SyncRecognize`. method. It
458
- # contains the result as zero or more sequential `SpeechRecognitionResult`
459
- # messages.
460
- class SyncRecognizeResponse
461
- include Google::Apis::Core::Hashable
462
-
463
- # *Output-only* Sequential list of transcription results corresponding to
464
- # sequential portions of audio.
465
- # Corresponds to the JSON property `results`
466
- # @return [Array<Google::Apis::SpeechV1beta1::SpeechRecognitionResult>]
467
- attr_accessor :results
468
-
469
- def initialize(**args)
470
- update!(**args)
471
- end
472
-
473
- # Update properties of this object
474
- def update!(**args)
475
- @results = args[:results] if args.key?(:results)
476
- end
477
- end
478
- end
479
- end
480
- end