google-api-client 0.9.8 → 0.9.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/Gemfile +9 -1
  4. data/README.md +10 -2
  5. data/api_names.yaml +61 -110
  6. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  7. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +160 -9
  8. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +46 -0
  9. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +22 -8
  10. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  11. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  12. data/generated/google/apis/admin_directory_v1.rb +1 -1
  13. data/generated/google/apis/admin_directory_v1/classes.rb +6 -0
  14. data/generated/google/apis/admin_directory_v1/representations.rb +1 -0
  15. data/generated/google/apis/admin_directory_v1/service.rb +2 -2
  16. data/generated/google/apis/admin_reports_v1.rb +3 -3
  17. data/generated/google/apis/admin_reports_v1/service.rb +2 -2
  18. data/generated/google/apis/adsense_v1_4.rb +1 -1
  19. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  20. data/generated/google/apis/analytics_v3.rb +1 -1
  21. data/generated/google/apis/analytics_v3/classes.rb +371 -1
  22. data/generated/google/apis/analytics_v3/representations.rb +135 -0
  23. data/generated/google/apis/analytics_v3/service.rb +218 -0
  24. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  25. data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
  26. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  27. data/generated/google/apis/androidenterprise_v1/classes.rb +722 -48
  28. data/generated/google/apis/androidenterprise_v1/representations.rb +305 -0
  29. data/generated/google/apis/androidenterprise_v1/service.rb +1180 -146
  30. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  31. data/generated/google/apis/androidpublisher_v2/classes.rb +9 -8
  32. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  33. data/generated/google/apis/appengine_v1beta5/classes.rb +430 -288
  34. data/generated/google/apis/appengine_v1beta5/representations.rb +84 -10
  35. data/generated/google/apis/appengine_v1beta5/service.rb +285 -25
  36. data/generated/google/apis/appsactivity_v1.rb +1 -1
  37. data/generated/google/apis/appstate_v1.rb +1 -1
  38. data/generated/google/apis/bigquery_v2.rb +1 -1
  39. data/generated/google/apis/bigquery_v2/classes.rb +254 -6
  40. data/generated/google/apis/bigquery_v2/representations.rb +85 -0
  41. data/generated/google/apis/bigquery_v2/service.rb +8 -2
  42. data/generated/google/apis/books_v1.rb +2 -2
  43. data/generated/google/apis/books_v1/classes.rb +77 -0
  44. data/generated/google/apis/books_v1/representations.rb +34 -0
  45. data/generated/google/apis/books_v1/service.rb +7 -3
  46. data/generated/google/apis/calendar_v3.rb +1 -1
  47. data/generated/google/apis/civicinfo_v2.rb +3 -2
  48. data/generated/google/apis/civicinfo_v2/classes.rb +16 -4
  49. data/generated/google/apis/civicinfo_v2/representations.rb +2 -0
  50. data/generated/google/apis/civicinfo_v2/service.rb +8 -2
  51. data/generated/google/apis/classroom_v1.rb +1 -1
  52. data/generated/google/apis/classroom_v1/classes.rb +176 -37
  53. data/generated/google/apis/classroom_v1/representations.rb +73 -9
  54. data/generated/google/apis/classroom_v1/service.rb +392 -37
  55. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  56. data/generated/google/apis/cloudbuild_v1/classes.rb +320 -12
  57. data/generated/google/apis/cloudbuild_v1/representations.rb +136 -2
  58. data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
  59. data/generated/google/apis/clouddebugger_v2.rb +3 -6
  60. data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
  61. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  62. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  63. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +157 -3
  64. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +33 -0
  65. data/generated/google/apis/cloudresourcemanager_v1/service.rb +60 -21
  66. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  67. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +22 -5
  68. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +2 -0
  69. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +61 -39
  70. data/generated/google/apis/compute_beta.rb +1 -1
  71. data/generated/google/apis/compute_beta/classes.rb +1620 -199
  72. data/generated/google/apis/compute_beta/representations.rb +563 -0
  73. data/generated/google/apis/compute_beta/service.rb +5123 -2690
  74. data/generated/google/apis/compute_v1.rb +1 -1
  75. data/generated/google/apis/compute_v1/classes.rb +1717 -295
  76. data/generated/google/apis/compute_v1/representations.rb +536 -0
  77. data/generated/google/apis/compute_v1/service.rb +2038 -1041
  78. data/generated/google/apis/content_v2.rb +1 -1
  79. data/generated/google/apis/content_v2/classes.rb +709 -1
  80. data/generated/google/apis/content_v2/representations.rb +319 -0
  81. data/generated/google/apis/content_v2/service.rb +244 -0
  82. data/generated/google/apis/datastore_v1.rb +38 -0
  83. data/generated/google/apis/datastore_v1/classes.rb +1284 -0
  84. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  85. data/generated/google/apis/datastore_v1/service.rb +259 -0
  86. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  87. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  88. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  89. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  90. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  91. data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
  92. data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
  93. data/generated/google/apis/deploymentmanager_v2/service.rb +162 -50
  94. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  95. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  96. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  97. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  98. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  99. data/generated/google/apis/dfareporting_v2_6/classes.rb +11585 -0
  100. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  101. data/generated/google/apis/dfareporting_v2_6/service.rb +9006 -0
  102. data/generated/google/apis/dns_v1.rb +1 -1
  103. data/generated/google/apis/dns_v1/classes.rb +1 -1
  104. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  105. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  106. data/generated/google/apis/drive_v2.rb +1 -1
  107. data/generated/google/apis/drive_v2/classes.rb +11 -3
  108. data/generated/google/apis/drive_v2/representations.rb +2 -0
  109. data/generated/google/apis/drive_v2/service.rb +8 -2
  110. data/generated/google/apis/drive_v3.rb +1 -1
  111. data/generated/google/apis/drive_v3/classes.rb +36 -16
  112. data/generated/google/apis/drive_v3/representations.rb +2 -0
  113. data/generated/google/apis/drive_v3/service.rb +4 -1
  114. data/generated/google/apis/fitness_v1.rb +8 -2
  115. data/generated/google/apis/fitness_v1/classes.rb +64 -6
  116. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  117. data/generated/google/apis/fitness_v1/service.rb +17 -18
  118. data/generated/google/apis/fusiontables_v2.rb +1 -1
  119. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  120. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  121. data/generated/google/apis/games_management_v1management.rb +1 -1
  122. data/generated/google/apis/games_v1.rb +1 -1
  123. data/generated/google/apis/genomics_v1.rb +2 -4
  124. data/generated/google/apis/genomics_v1/classes.rb +111 -9
  125. data/generated/google/apis/genomics_v1/representations.rb +36 -0
  126. data/generated/google/apis/genomics_v1/service.rb +4 -7
  127. data/generated/google/apis/gmail_v1.rb +7 -1
  128. data/generated/google/apis/gmail_v1/classes.rb +540 -0
  129. data/generated/google/apis/gmail_v1/representations.rb +213 -0
  130. data/generated/google/apis/gmail_v1/service.rb +898 -1
  131. data/generated/google/apis/groupssettings_v1.rb +1 -1
  132. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  133. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  134. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  135. data/generated/google/apis/identitytoolkit_v3/classes.rb +154 -1
  136. data/generated/google/apis/identitytoolkit_v3/representations.rb +35 -0
  137. data/generated/google/apis/language_v1beta1.rb +36 -0
  138. data/generated/google/apis/language_v1beta1/classes.rb +596 -0
  139. data/generated/google/apis/language_v1beta1/representations.rb +289 -0
  140. data/generated/google/apis/language_v1beta1/service.rb +154 -0
  141. data/generated/google/apis/mirror_v1.rb +2 -2
  142. data/generated/google/apis/mirror_v1/service.rb +1 -1
  143. data/generated/google/apis/monitoring_v3.rb +45 -0
  144. data/generated/google/apis/monitoring_v3/classes.rb +1328 -0
  145. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  146. data/generated/google/apis/monitoring_v3/service.rb +711 -0
  147. data/generated/google/apis/oauth2_v2.rb +1 -1
  148. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  149. data/generated/google/apis/plus_domains_v1.rb +1 -1
  150. data/generated/google/apis/plus_v1.rb +1 -1
  151. data/generated/google/apis/qpx_express_v1.rb +1 -1
  152. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  153. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  154. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  155. data/generated/google/apis/script_v1.rb +1 -1
  156. data/generated/google/apis/script_v1/classes.rb +6 -0
  157. data/generated/google/apis/script_v1/representations.rb +1 -0
  158. data/generated/google/apis/sheets_v4.rb +1 -1
  159. data/generated/google/apis/sheets_v4/classes.rb +35 -0
  160. data/generated/google/apis/sheets_v4/representations.rb +16 -0
  161. data/generated/google/apis/sheets_v4/service.rb +55 -0
  162. data/generated/google/apis/speech_v1beta1.rb +34 -0
  163. data/generated/google/apis/speech_v1beta1/classes.rb +521 -0
  164. data/generated/google/apis/speech_v1beta1/representations.rb +219 -0
  165. data/generated/google/apis/speech_v1beta1/service.rb +268 -0
  166. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  167. data/generated/google/apis/sqladmin_v1beta4/classes.rb +26 -8
  168. data/generated/google/apis/sqladmin_v1beta4/representations.rb +2 -0
  169. data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
  170. data/generated/google/apis/storage_v1.rb +1 -1
  171. data/generated/google/apis/storage_v1/classes.rb +19 -10
  172. data/generated/google/apis/translate_v2.rb +2 -2
  173. data/generated/google/apis/translate_v2/service.rb +1 -1
  174. data/generated/google/apis/vision_v1.rb +1 -1
  175. data/generated/google/apis/vision_v1/classes.rb +10 -9
  176. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  177. data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
  178. data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
  179. data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
  180. data/generated/google/apis/youtube_v3.rb +1 -1
  181. data/generated/google/apis/youtube_v3/classes.rb +163 -2
  182. data/generated/google/apis/youtube_v3/representations.rb +82 -0
  183. data/generated/google/apis/youtube_v3/service.rb +6 -2
  184. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  185. data/google-api-client.gemspec +2 -1
  186. data/lib/google/apis/core/api_command.rb +4 -0
  187. data/lib/google/apis/core/base_service.rb +10 -4
  188. data/lib/google/apis/core/download.rb +7 -2
  189. data/lib/google/apis/core/http_command.rb +5 -1
  190. data/lib/google/apis/core/upload.rb +7 -1
  191. data/lib/google/apis/errors.rb +2 -2
  192. data/lib/google/apis/generator/annotator.rb +6 -0
  193. data/lib/google/apis/version.rb +1 -1
  194. data/samples/cli/lib/samples/bigquery.rb +101 -0
  195. data/samples/cli/lib/samples/sheets.rb +61 -0
  196. data/sync.rb +71 -0
  197. metadata +43 -13
@@ -0,0 +1,219 @@
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
+ class Status
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class RecognitionAudio
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Operation
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class SpeechRecognitionAlternative
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class CancelOperationRequest
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class RecognitionConfig
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class SyncRecognizeRequest
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class SpeechRecognitionResult
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class ListOperationsResponse
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class SyncRecognizeResponse
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Empty
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class SpeechContext
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class AsyncRecognizeRequest
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class Status
104
+ # @private
105
+ class Representation < Google::Apis::Core::JsonRepresentation
106
+ property :code, as: 'code'
107
+ collection :details, as: 'details'
108
+ property :message, as: 'message'
109
+ end
110
+ end
111
+
112
+ class RecognitionAudio
113
+ # @private
114
+ class Representation < Google::Apis::Core::JsonRepresentation
115
+ property :content, :base64 => true, as: 'content'
116
+ property :uri, as: 'uri'
117
+ end
118
+ end
119
+
120
+ class Operation
121
+ # @private
122
+ class Representation < Google::Apis::Core::JsonRepresentation
123
+ property :error, as: 'error', class: Google::Apis::SpeechV1beta1::Status, decorator: Google::Apis::SpeechV1beta1::Status::Representation
124
+
125
+ property :done, as: 'done'
126
+ hash :metadata, as: 'metadata'
127
+ hash :response, as: 'response'
128
+ property :name, as: 'name'
129
+ end
130
+ end
131
+
132
+ class SpeechRecognitionAlternative
133
+ # @private
134
+ class Representation < Google::Apis::Core::JsonRepresentation
135
+ property :transcript, as: 'transcript'
136
+ property :confidence, as: 'confidence'
137
+ end
138
+ end
139
+
140
+ class CancelOperationRequest
141
+ # @private
142
+ class Representation < Google::Apis::Core::JsonRepresentation
143
+ end
144
+ end
145
+
146
+ class RecognitionConfig
147
+ # @private
148
+ class Representation < Google::Apis::Core::JsonRepresentation
149
+ property :max_alternatives, as: 'maxAlternatives'
150
+ property :language_code, as: 'languageCode'
151
+ property :speech_context, as: 'speechContext', class: Google::Apis::SpeechV1beta1::SpeechContext, decorator: Google::Apis::SpeechV1beta1::SpeechContext::Representation
152
+
153
+ property :encoding, as: 'encoding'
154
+ property :profanity_filter, as: 'profanityFilter'
155
+ property :sample_rate, as: 'sampleRate'
156
+ property :audio_channels, as: 'audioChannels'
157
+ end
158
+ end
159
+
160
+ class SyncRecognizeRequest
161
+ # @private
162
+ class Representation < Google::Apis::Core::JsonRepresentation
163
+ property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation
164
+
165
+ property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation
166
+
167
+ end
168
+ end
169
+
170
+ class SpeechRecognitionResult
171
+ # @private
172
+ class Representation < Google::Apis::Core::JsonRepresentation
173
+ collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative::Representation
174
+
175
+ end
176
+ end
177
+
178
+ class ListOperationsResponse
179
+ # @private
180
+ class Representation < Google::Apis::Core::JsonRepresentation
181
+ property :next_page_token, as: 'nextPageToken'
182
+ collection :operations, as: 'operations', class: Google::Apis::SpeechV1beta1::Operation, decorator: Google::Apis::SpeechV1beta1::Operation::Representation
183
+
184
+ end
185
+ end
186
+
187
+ class SyncRecognizeResponse
188
+ # @private
189
+ class Representation < Google::Apis::Core::JsonRepresentation
190
+ collection :results, as: 'results', class: Google::Apis::SpeechV1beta1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionResult::Representation
191
+
192
+ end
193
+ end
194
+
195
+ class Empty
196
+ # @private
197
+ class Representation < Google::Apis::Core::JsonRepresentation
198
+ end
199
+ end
200
+
201
+ class SpeechContext
202
+ # @private
203
+ class Representation < Google::Apis::Core::JsonRepresentation
204
+ collection :phrases, as: 'phrases'
205
+ end
206
+ end
207
+
208
+ class AsyncRecognizeRequest
209
+ # @private
210
+ class Representation < Google::Apis::Core::JsonRepresentation
211
+ property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation
212
+
213
+ property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation
214
+
215
+ end
216
+ end
217
+ end
218
+ end
219
+ end
@@ -0,0 +1,268 @@
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 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module SpeechV1beta1
23
+ # Google Cloud Speech API
24
+ #
25
+ # Google Cloud Speech API.
26
+ #
27
+ # @example
28
+ # require 'google/apis/speech_v1beta1'
29
+ #
30
+ # Speech = Google::Apis::SpeechV1beta1 # Alias the module
31
+ # service = Speech::SpeechService.new
32
+ #
33
+ # @see https://cloud.google.com/speech/
34
+ class SpeechService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://speech.googleapis.com/', '')
47
+ end
48
+
49
+ # Perform synchronous speech-recognition: receive results after all audio
50
+ # has been sent and processed.
51
+ # @param [Google::Apis::SpeechV1beta1::SyncRecognizeRequest] sync_recognize_request_object
52
+ # @param [String] quota_user
53
+ # Available to use for quota purposes for server-side applications. Can be any
54
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [Google::Apis::RequestOptions] options
58
+ # Request-specific options
59
+ #
60
+ # @yield [result, err] Result & error if block supplied
61
+ # @yieldparam result [Google::Apis::SpeechV1beta1::SyncRecognizeResponse] parsed result object
62
+ # @yieldparam err [StandardError] error object if request failed
63
+ #
64
+ # @return [Google::Apis::SpeechV1beta1::SyncRecognizeResponse]
65
+ #
66
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
67
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
68
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
69
+ def sync_recognize_speech(sync_recognize_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
70
+ command = make_simple_command(:post, 'v1beta1/speech:syncrecognize', options)
71
+ command.request_representation = Google::Apis::SpeechV1beta1::SyncRecognizeRequest::Representation
72
+ command.request_object = sync_recognize_request_object
73
+ command.response_representation = Google::Apis::SpeechV1beta1::SyncRecognizeResponse::Representation
74
+ command.response_class = Google::Apis::SpeechV1beta1::SyncRecognizeResponse
75
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
76
+ command.query['fields'] = fields unless fields.nil?
77
+ execute_or_queue_command(command, &block)
78
+ end
79
+
80
+ # Perform asynchronous speech-recognition: receive results via the
81
+ # google.longrunning.Operations interface. Returns either an
82
+ # `Operation.error` or an `Operation.response` which contains
83
+ # an `AsyncRecognizeResponse` message.
84
+ # @param [Google::Apis::SpeechV1beta1::AsyncRecognizeRequest] async_recognize_request_object
85
+ # @param [String] quota_user
86
+ # Available to use for quota purposes for server-side applications. Can be any
87
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
88
+ # @param [String] fields
89
+ # Selector specifying which fields to include in a partial response.
90
+ # @param [Google::Apis::RequestOptions] options
91
+ # Request-specific options
92
+ #
93
+ # @yield [result, err] Result & error if block supplied
94
+ # @yieldparam result [Google::Apis::SpeechV1beta1::Operation] parsed result object
95
+ # @yieldparam err [StandardError] error object if request failed
96
+ #
97
+ # @return [Google::Apis::SpeechV1beta1::Operation]
98
+ #
99
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
100
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
101
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
102
+ def async_recognize_speech(async_recognize_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
103
+ command = make_simple_command(:post, 'v1beta1/speech:asyncrecognize', options)
104
+ command.request_representation = Google::Apis::SpeechV1beta1::AsyncRecognizeRequest::Representation
105
+ command.request_object = async_recognize_request_object
106
+ command.response_representation = Google::Apis::SpeechV1beta1::Operation::Representation
107
+ command.response_class = Google::Apis::SpeechV1beta1::Operation
108
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
109
+ command.query['fields'] = fields unless fields.nil?
110
+ execute_or_queue_command(command, &block)
111
+ end
112
+
113
+ # Gets the latest state of a long-running operation. Clients can use this
114
+ # method to poll the operation result at intervals as recommended by the API
115
+ # service.
116
+ # @param [String] name
117
+ # The name of the operation resource.
118
+ # @param [String] quota_user
119
+ # Available to use for quota purposes for server-side applications. Can be any
120
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
121
+ # @param [String] fields
122
+ # Selector specifying which fields to include in a partial response.
123
+ # @param [Google::Apis::RequestOptions] options
124
+ # Request-specific options
125
+ #
126
+ # @yield [result, err] Result & error if block supplied
127
+ # @yieldparam result [Google::Apis::SpeechV1beta1::Operation] parsed result object
128
+ # @yieldparam err [StandardError] error object if request failed
129
+ #
130
+ # @return [Google::Apis::SpeechV1beta1::Operation]
131
+ #
132
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
133
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
134
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
135
+ def get_operation(name, quota_user: nil, fields: nil, options: nil, &block)
136
+ command = make_simple_command(:get, 'v1beta1/operations/{+name}', options)
137
+ command.response_representation = Google::Apis::SpeechV1beta1::Operation::Representation
138
+ command.response_class = Google::Apis::SpeechV1beta1::Operation
139
+ command.params['name'] = name unless name.nil?
140
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
141
+ command.query['fields'] = fields unless fields.nil?
142
+ execute_or_queue_command(command, &block)
143
+ end
144
+
145
+ # Lists operations that match the specified filter in the request. If the
146
+ # server doesn't support this method, it returns `UNIMPLEMENTED`.
147
+ # NOTE: the `name` binding below allows API services to override the binding
148
+ # to use different resource name schemes, such as `users/*/operations`.
149
+ # @param [Fixnum] page_size
150
+ # The standard list page size.
151
+ # @param [String] filter
152
+ # The standard list filter.
153
+ # @param [String] name
154
+ # The name of the operation collection.
155
+ # @param [String] page_token
156
+ # The standard list page token.
157
+ # @param [String] quota_user
158
+ # Available to use for quota purposes for server-side applications. Can be any
159
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
160
+ # @param [String] fields
161
+ # Selector specifying which fields to include in a partial response.
162
+ # @param [Google::Apis::RequestOptions] options
163
+ # Request-specific options
164
+ #
165
+ # @yield [result, err] Result & error if block supplied
166
+ # @yieldparam result [Google::Apis::SpeechV1beta1::ListOperationsResponse] parsed result object
167
+ # @yieldparam err [StandardError] error object if request failed
168
+ #
169
+ # @return [Google::Apis::SpeechV1beta1::ListOperationsResponse]
170
+ #
171
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
172
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
173
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
174
+ def list_operations(page_size: nil, filter: nil, name: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
175
+ command = make_simple_command(:get, 'v1beta1/operations', options)
176
+ command.response_representation = Google::Apis::SpeechV1beta1::ListOperationsResponse::Representation
177
+ command.response_class = Google::Apis::SpeechV1beta1::ListOperationsResponse
178
+ command.query['pageSize'] = page_size unless page_size.nil?
179
+ command.query['filter'] = filter unless filter.nil?
180
+ command.query['name'] = name unless name.nil?
181
+ command.query['pageToken'] = page_token unless page_token.nil?
182
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
183
+ command.query['fields'] = fields unless fields.nil?
184
+ execute_or_queue_command(command, &block)
185
+ end
186
+
187
+ # Starts asynchronous cancellation on a long-running operation. The server
188
+ # makes a best effort to cancel the operation, but success is not
189
+ # guaranteed. If the server doesn't support this method, it returns
190
+ # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
191
+ # Operations.GetOperation or
192
+ # other methods to check whether the cancellation succeeded or whether the
193
+ # operation completed despite cancellation.
194
+ # @param [String] name
195
+ # The name of the operation resource to be cancelled.
196
+ # @param [Google::Apis::SpeechV1beta1::CancelOperationRequest] cancel_operation_request_object
197
+ # @param [String] quota_user
198
+ # Available to use for quota purposes for server-side applications. Can be any
199
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
200
+ # @param [String] fields
201
+ # Selector specifying which fields to include in a partial response.
202
+ # @param [Google::Apis::RequestOptions] options
203
+ # Request-specific options
204
+ #
205
+ # @yield [result, err] Result & error if block supplied
206
+ # @yieldparam result [Google::Apis::SpeechV1beta1::Empty] parsed result object
207
+ # @yieldparam err [StandardError] error object if request failed
208
+ #
209
+ # @return [Google::Apis::SpeechV1beta1::Empty]
210
+ #
211
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
212
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
213
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
214
+ def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
215
+ command = make_simple_command(:post, 'v1beta1/operations/{+name}:cancel', options)
216
+ command.request_representation = Google::Apis::SpeechV1beta1::CancelOperationRequest::Representation
217
+ command.request_object = cancel_operation_request_object
218
+ command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation
219
+ command.response_class = Google::Apis::SpeechV1beta1::Empty
220
+ command.params['name'] = name unless name.nil?
221
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
222
+ command.query['fields'] = fields unless fields.nil?
223
+ execute_or_queue_command(command, &block)
224
+ end
225
+
226
+ # Deletes a long-running operation. This method indicates that the client is
227
+ # no longer interested in the operation result. It does not cancel the
228
+ # operation. If the server doesn't support this method, it returns
229
+ # `google.rpc.Code.UNIMPLEMENTED`.
230
+ # @param [String] name
231
+ # The name of the operation resource to be deleted.
232
+ # @param [String] quota_user
233
+ # Available to use for quota purposes for server-side applications. Can be any
234
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
235
+ # @param [String] fields
236
+ # Selector specifying which fields to include in a partial response.
237
+ # @param [Google::Apis::RequestOptions] options
238
+ # Request-specific options
239
+ #
240
+ # @yield [result, err] Result & error if block supplied
241
+ # @yieldparam result [Google::Apis::SpeechV1beta1::Empty] parsed result object
242
+ # @yieldparam err [StandardError] error object if request failed
243
+ #
244
+ # @return [Google::Apis::SpeechV1beta1::Empty]
245
+ #
246
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
247
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
248
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
249
+ def delete_operation(name, quota_user: nil, fields: nil, options: nil, &block)
250
+ command = make_simple_command(:delete, 'v1beta1/operations/{+name}', options)
251
+ command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation
252
+ command.response_class = Google::Apis::SpeechV1beta1::Empty
253
+ command.params['name'] = name unless name.nil?
254
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
255
+ command.query['fields'] = fields unless fields.nil?
256
+ execute_or_queue_command(command, &block)
257
+ end
258
+
259
+ protected
260
+
261
+ def apply_command_defaults(command)
262
+ command.query['key'] = key unless key.nil?
263
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
264
+ end
265
+ end
266
+ end
267
+ end
268
+ end