google-api-client 0.9.12 → 0.9.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -1
  3. data/README.md +9 -1
  4. data/api_names.yaml +2 -0
  5. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  6. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +8 -0
  7. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1 -0
  8. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +12 -4
  9. data/generated/google/apis/admin_directory_v1.rb +1 -1
  10. data/generated/google/apis/adsense_v1_4.rb +1 -1
  11. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  12. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  13. data/generated/google/apis/androidenterprise_v1/classes.rb +13 -5
  14. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  15. data/generated/google/apis/appstate_v1.rb +1 -1
  16. data/generated/google/apis/bigquery_v2.rb +1 -1
  17. data/generated/google/apis/bigquery_v2/classes.rb +186 -0
  18. data/generated/google/apis/bigquery_v2/representations.rb +77 -0
  19. data/generated/google/apis/calendar_v3.rb +1 -1
  20. data/generated/google/apis/civicinfo_v2.rb +1 -1
  21. data/generated/google/apis/civicinfo_v2/classes.rb +10 -4
  22. data/generated/google/apis/civicinfo_v2/representations.rb +1 -0
  23. data/generated/google/apis/civicinfo_v2/service.rb +6 -1
  24. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  25. data/generated/google/apis/cloudbuild_v1/classes.rb +7 -0
  26. data/generated/google/apis/cloudbuild_v1/representations.rb +1 -0
  27. data/generated/google/apis/compute_beta.rb +1 -1
  28. data/generated/google/apis/compute_v1.rb +1 -1
  29. data/generated/google/apis/content_v2.rb +1 -1
  30. data/generated/google/apis/datastore_v1beta3.rb +1 -1
  31. data/generated/google/apis/datastore_v1beta3/classes.rb +26 -27
  32. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  33. data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -2
  34. data/generated/google/apis/dns_v1.rb +1 -1
  35. data/generated/google/apis/dns_v1/classes.rb +1 -1
  36. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  37. data/generated/google/apis/drive_v2.rb +1 -1
  38. data/generated/google/apis/drive_v2/classes.rb +4 -2
  39. data/generated/google/apis/drive_v3.rb +1 -1
  40. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  41. data/generated/google/apis/games_management_v1management.rb +1 -1
  42. data/generated/google/apis/games_v1.rb +1 -1
  43. data/generated/google/apis/genomics_v1.rb +1 -1
  44. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  45. data/generated/google/apis/identitytoolkit_v3/classes.rb +26 -0
  46. data/generated/google/apis/identitytoolkit_v3/representations.rb +4 -0
  47. data/generated/google/apis/language_v1beta1.rb +36 -0
  48. data/generated/google/apis/language_v1beta1/classes.rb +596 -0
  49. data/generated/google/apis/language_v1beta1/representations.rb +289 -0
  50. data/generated/google/apis/language_v1beta1/service.rb +154 -0
  51. data/generated/google/apis/monitoring_v3.rb +1 -1
  52. data/generated/google/apis/monitoring_v3/classes.rb +2 -2
  53. data/generated/google/apis/oauth2_v2.rb +1 -1
  54. data/generated/google/apis/plus_domains_v1.rb +1 -1
  55. data/generated/google/apis/plus_v1.rb +1 -1
  56. data/generated/google/apis/sheets_v4.rb +1 -1
  57. data/generated/google/apis/speech_v1beta1.rb +34 -0
  58. data/generated/google/apis/speech_v1beta1/classes.rb +512 -0
  59. data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
  60. data/generated/google/apis/speech_v1beta1/service.rb +268 -0
  61. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  62. data/generated/google/apis/sqladmin_v1beta4/service.rb +2 -1
  63. data/generated/google/apis/vision_v1.rb +1 -1
  64. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  65. data/google-api-client.gemspec +2 -1
  66. data/lib/google/apis/core/base_service.rb +10 -5
  67. data/lib/google/apis/version.rb +1 -1
  68. metadata +20 -12
@@ -0,0 +1,218 @@
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
+ end
157
+ end
158
+
159
+ class SyncRecognizeRequest
160
+ # @private
161
+ class Representation < Google::Apis::Core::JsonRepresentation
162
+ property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation
163
+
164
+ property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation
165
+
166
+ end
167
+ end
168
+
169
+ class SpeechRecognitionResult
170
+ # @private
171
+ class Representation < Google::Apis::Core::JsonRepresentation
172
+ collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative::Representation
173
+
174
+ end
175
+ end
176
+
177
+ class ListOperationsResponse
178
+ # @private
179
+ class Representation < Google::Apis::Core::JsonRepresentation
180
+ property :next_page_token, as: 'nextPageToken'
181
+ collection :operations, as: 'operations', class: Google::Apis::SpeechV1beta1::Operation, decorator: Google::Apis::SpeechV1beta1::Operation::Representation
182
+
183
+ end
184
+ end
185
+
186
+ class SyncRecognizeResponse
187
+ # @private
188
+ class Representation < Google::Apis::Core::JsonRepresentation
189
+ collection :results, as: 'results', class: Google::Apis::SpeechV1beta1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionResult::Representation
190
+
191
+ end
192
+ end
193
+
194
+ class Empty
195
+ # @private
196
+ class Representation < Google::Apis::Core::JsonRepresentation
197
+ end
198
+ end
199
+
200
+ class SpeechContext
201
+ # @private
202
+ class Representation < Google::Apis::Core::JsonRepresentation
203
+ collection :phrases, as: 'phrases'
204
+ end
205
+ end
206
+
207
+ class AsyncRecognizeRequest
208
+ # @private
209
+ class Representation < Google::Apis::Core::JsonRepresentation
210
+ property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation
211
+
212
+ property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation
213
+
214
+ end
215
+ end
216
+ end
217
+ end
218
+ 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::CloudSpeechAPIService.new
32
+ #
33
+ # @see https://cloud.google.com/speech/
34
+ class CloudSpeechAPIService < 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