google-api-client 0.9.26 → 0.9.28

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 (123) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/api_names.yaml +36326 -36213
  5. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +155 -155
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +32 -32
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +104 -104
  9. data/generated/google/apis/adsense_v1_4.rb +1 -1
  10. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  11. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  12. data/generated/google/apis/appstate_v1.rb +1 -1
  13. data/generated/google/apis/calendar_v3.rb +1 -1
  14. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  15. data/generated/google/apis/cloudbuild_v1/classes.rb +260 -248
  16. data/generated/google/apis/cloudbuild_v1/representations.rb +47 -45
  17. data/generated/google/apis/cloudbuild_v1/service.rb +167 -167
  18. data/generated/google/apis/clouddebugger_v2.rb +3 -3
  19. data/generated/google/apis/clouddebugger_v2/classes.rb +569 -569
  20. data/generated/google/apis/clouddebugger_v2/representations.rb +146 -146
  21. data/generated/google/apis/clouddebugger_v2/service.rb +145 -145
  22. data/generated/google/apis/cloudkms_v1beta1.rb +4 -3
  23. data/generated/google/apis/cloudkms_v1beta1/classes.rb +428 -428
  24. data/generated/google/apis/cloudkms_v1beta1/representations.rb +115 -115
  25. data/generated/google/apis/cloudkms_v1beta1/service.rb +161 -160
  26. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  27. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  28. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +583 -583
  29. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +100 -100
  30. data/generated/google/apis/cloudresourcemanager_v1/service.rb +116 -116
  31. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  32. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +195 -195
  33. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +58 -58
  34. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +316 -316
  35. data/generated/google/apis/content_v2.rb +1 -1
  36. data/generated/google/apis/content_v2/classes.rb +12 -0
  37. data/generated/google/apis/content_v2/representations.rb +2 -0
  38. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  39. data/generated/google/apis/dataflow_v1b3/classes.rb +2833 -2694
  40. data/generated/google/apis/dataflow_v1b3/representations.rb +666 -666
  41. data/generated/google/apis/dataflow_v1b3/service.rb +351 -349
  42. data/generated/google/apis/datastore_v1.rb +1 -1
  43. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  44. data/generated/google/apis/deploymentmanager_v2/classes.rb +21 -12
  45. data/generated/google/apis/deploymentmanager_v2/representations.rb +1 -0
  46. data/generated/google/apis/deploymentmanager_v2/service.rb +5 -5
  47. data/generated/google/apis/dns_v1.rb +1 -1
  48. data/generated/google/apis/dns_v2beta1.rb +1 -1
  49. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  50. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  51. data/generated/google/apis/drive_v2.rb +1 -1
  52. data/generated/google/apis/drive_v2/classes.rb +26 -0
  53. data/generated/google/apis/drive_v2/representations.rb +14 -0
  54. data/generated/google/apis/drive_v2/service.rb +38 -2
  55. data/generated/google/apis/drive_v3.rb +1 -1
  56. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  57. data/generated/google/apis/games_management_v1management.rb +1 -1
  58. data/generated/google/apis/games_v1.rb +1 -1
  59. data/generated/google/apis/genomics_v1.rb +4 -4
  60. data/generated/google/apis/genomics_v1/classes.rb +2317 -2317
  61. data/generated/google/apis/genomics_v1/representations.rb +476 -476
  62. data/generated/google/apis/genomics_v1/service.rb +1038 -1038
  63. data/generated/google/apis/gmail_v1.rb +1 -1
  64. data/generated/google/apis/gmail_v1/classes.rb +82 -1
  65. data/generated/google/apis/gmail_v1/representations.rb +33 -0
  66. data/generated/google/apis/gmail_v1/service.rb +215 -5
  67. data/generated/google/apis/iam_v1.rb +1 -1
  68. data/generated/google/apis/iam_v1/classes.rb +446 -343
  69. data/generated/google/apis/iam_v1/representations.rb +112 -85
  70. data/generated/google/apis/iam_v1/service.rb +248 -192
  71. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  72. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  73. data/generated/google/apis/kgsearch_v1/service.rb +15 -15
  74. data/generated/google/apis/language_v1beta1.rb +1 -1
  75. data/generated/google/apis/language_v1beta1/classes.rb +396 -396
  76. data/generated/google/apis/language_v1beta1/representations.rb +97 -97
  77. data/generated/google/apis/language_v1beta1/service.rb +42 -42
  78. data/generated/google/apis/logging_v2beta1.rb +1 -1
  79. data/generated/google/apis/logging_v2beta1/classes.rb +855 -855
  80. data/generated/google/apis/logging_v2beta1/representations.rb +155 -155
  81. data/generated/google/apis/logging_v2beta1/service.rb +214 -214
  82. data/generated/google/apis/monitoring_v3.rb +4 -4
  83. data/generated/google/apis/monitoring_v3/classes.rb +551 -551
  84. data/generated/google/apis/monitoring_v3/representations.rb +123 -123
  85. data/generated/google/apis/monitoring_v3/service.rb +80 -80
  86. data/generated/google/apis/plus_domains_v1.rb +1 -1
  87. data/generated/google/apis/plus_v1.rb +1 -1
  88. data/generated/google/apis/pubsub_v1.rb +3 -3
  89. data/generated/google/apis/pubsub_v1/classes.rb +391 -391
  90. data/generated/google/apis/pubsub_v1/representations.rb +83 -83
  91. data/generated/google/apis/pubsub_v1/service.rb +257 -257
  92. data/generated/google/apis/sheets_v4.rb +1 -1
  93. data/generated/google/apis/sheets_v4/classes.rb +4334 -4334
  94. data/generated/google/apis/sheets_v4/representations.rb +861 -861
  95. data/generated/google/apis/sheets_v4/service.rb +191 -191
  96. data/generated/google/apis/slides_v1.rb +7 -7
  97. data/generated/google/apis/slides_v1/classes.rb +2726 -2555
  98. data/generated/google/apis/slides_v1/representations.rb +678 -607
  99. data/generated/google/apis/slides_v1/service.rb +16 -16
  100. data/generated/google/apis/speech_v1beta1.rb +1 -1
  101. data/generated/google/apis/speech_v1beta1/classes.rb +57 -59
  102. data/generated/google/apis/speech_v1beta1/representations.rb +9 -9
  103. data/generated/google/apis/speech_v1beta1/service.rb +63 -63
  104. data/generated/google/apis/storage_v1.rb +1 -1
  105. data/generated/google/apis/storage_v1/classes.rb +4 -3
  106. data/generated/google/apis/vision_v1/classes.rb +925 -925
  107. data/generated/google/apis/vision_v1/representations.rb +134 -134
  108. data/generated/google/apis/vision_v1/service.rb +4 -4
  109. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  110. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  111. data/generated/google/apis/youtube_v3.rb +1 -1
  112. data/generated/google/apis/youtube_v3/classes.rb +234 -1
  113. data/generated/google/apis/youtube_v3/representations.rb +83 -0
  114. data/generated/google/apis/youtube_v3/service.rb +55 -0
  115. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  116. data/generated/google/apis/youtubereporting_v1/classes.rb +105 -105
  117. data/generated/google/apis/youtubereporting_v1/representations.rb +31 -31
  118. data/generated/google/apis/youtubereporting_v1/service.rb +78 -78
  119. data/lib/google/apis/core/api_command.rb +11 -5
  120. data/lib/google/apis/core/base_service.rb +7 -5
  121. data/lib/google/apis/errors.rb +4 -0
  122. data/lib/google/apis/version.rb +1 -1
  123. metadata +28 -28
@@ -49,11 +49,11 @@ module Google
49
49
  # Gets the latest version of the specified presentation.
50
50
  # @param [String] presentation_id
51
51
  # The ID of the presentation to retrieve.
52
+ # @param [String] fields
53
+ # Selector specifying which fields to include in a partial response.
52
54
  # @param [String] quota_user
53
55
  # Available to use for quota purposes for server-side applications. Can be any
54
56
  # 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
57
  # @param [Google::Apis::RequestOptions] options
58
58
  # Request-specific options
59
59
  #
@@ -66,13 +66,13 @@ module Google
66
66
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
67
67
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
68
68
  # @raise [Google::Apis::AuthorizationError] Authorization is required
69
- def get_presentation(presentation_id, quota_user: nil, fields: nil, options: nil, &block)
69
+ def get_presentation(presentation_id, fields: nil, quota_user: nil, options: nil, &block)
70
70
  command = make_simple_command(:get, 'v1/presentations/{+presentationId}', options)
71
71
  command.response_representation = Google::Apis::SlidesV1::Presentation::Representation
72
72
  command.response_class = Google::Apis::SlidesV1::Presentation
73
73
  command.params['presentationId'] = presentation_id unless presentation_id.nil?
74
- command.query['quotaUser'] = quota_user unless quota_user.nil?
75
74
  command.query['fields'] = fields unless fields.nil?
75
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
76
76
  execute_or_queue_command(command, &block)
77
77
  end
78
78
 
@@ -80,11 +80,11 @@ module Google
80
80
  # fields in the request are ignored.
81
81
  # Returns the created presentation.
82
82
  # @param [Google::Apis::SlidesV1::Presentation] presentation_object
83
+ # @param [String] fields
84
+ # Selector specifying which fields to include in a partial response.
83
85
  # @param [String] quota_user
84
86
  # Available to use for quota purposes for server-side applications. Can be any
85
87
  # arbitrary string assigned to a user, but should not exceed 40 characters.
86
- # @param [String] fields
87
- # Selector specifying which fields to include in a partial response.
88
88
  # @param [Google::Apis::RequestOptions] options
89
89
  # Request-specific options
90
90
  #
@@ -97,14 +97,14 @@ module Google
97
97
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
98
98
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
99
99
  # @raise [Google::Apis::AuthorizationError] Authorization is required
100
- def create_presentation(presentation_object = nil, quota_user: nil, fields: nil, options: nil, &block)
100
+ def create_presentation(presentation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
101
101
  command = make_simple_command(:post, 'v1/presentations', options)
102
102
  command.request_representation = Google::Apis::SlidesV1::Presentation::Representation
103
103
  command.request_object = presentation_object
104
104
  command.response_representation = Google::Apis::SlidesV1::Presentation::Representation
105
105
  command.response_class = Google::Apis::SlidesV1::Presentation
106
- command.query['quotaUser'] = quota_user unless quota_user.nil?
107
106
  command.query['fields'] = fields unless fields.nil?
107
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
108
108
  execute_or_queue_command(command, &block)
109
109
  end
110
110
 
@@ -128,11 +128,11 @@ module Google
128
128
  # @param [String] presentation_id
129
129
  # The presentation to apply the updates to.
130
130
  # @param [Google::Apis::SlidesV1::BatchUpdatePresentationRequest] batch_update_presentation_request_object
131
+ # @param [String] fields
132
+ # Selector specifying which fields to include in a partial response.
131
133
  # @param [String] quota_user
132
134
  # Available to use for quota purposes for server-side applications. Can be any
133
135
  # arbitrary string assigned to a user, but should not exceed 40 characters.
134
- # @param [String] fields
135
- # Selector specifying which fields to include in a partial response.
136
136
  # @param [Google::Apis::RequestOptions] options
137
137
  # Request-specific options
138
138
  #
@@ -145,15 +145,15 @@ module Google
145
145
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
146
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
147
  # @raise [Google::Apis::AuthorizationError] Authorization is required
148
- def batch_update_presentation(presentation_id, batch_update_presentation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
148
+ def batch_update_presentation(presentation_id, batch_update_presentation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
149
149
  command = make_simple_command(:post, 'v1/presentations/{presentationId}:batchUpdate', options)
150
150
  command.request_representation = Google::Apis::SlidesV1::BatchUpdatePresentationRequest::Representation
151
151
  command.request_object = batch_update_presentation_request_object
152
152
  command.response_representation = Google::Apis::SlidesV1::BatchUpdatePresentationResponse::Representation
153
153
  command.response_class = Google::Apis::SlidesV1::BatchUpdatePresentationResponse
154
154
  command.params['presentationId'] = presentation_id unless presentation_id.nil?
155
- command.query['quotaUser'] = quota_user unless quota_user.nil?
156
155
  command.query['fields'] = fields unless fields.nil?
156
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
157
157
  execute_or_queue_command(command, &block)
158
158
  end
159
159
 
@@ -162,11 +162,11 @@ module Google
162
162
  # The ID of the presentation to retrieve.
163
163
  # @param [String] page_object_id
164
164
  # The object ID of the page to retrieve.
165
+ # @param [String] fields
166
+ # Selector specifying which fields to include in a partial response.
165
167
  # @param [String] quota_user
166
168
  # Available to use for quota purposes for server-side applications. Can be any
167
169
  # arbitrary string assigned to a user, but should not exceed 40 characters.
168
- # @param [String] fields
169
- # Selector specifying which fields to include in a partial response.
170
170
  # @param [Google::Apis::RequestOptions] options
171
171
  # Request-specific options
172
172
  #
@@ -179,14 +179,14 @@ module Google
179
179
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
180
180
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
181
181
  # @raise [Google::Apis::AuthorizationError] Authorization is required
182
- def get_presentation_page(presentation_id, page_object_id, quota_user: nil, fields: nil, options: nil, &block)
182
+ def get_presentation_page(presentation_id, page_object_id, fields: nil, quota_user: nil, options: nil, &block)
183
183
  command = make_simple_command(:get, 'v1/presentations/{presentationId}/pages/{pageObjectId}', options)
184
184
  command.response_representation = Google::Apis::SlidesV1::Page::Representation
185
185
  command.response_class = Google::Apis::SlidesV1::Page
186
186
  command.params['presentationId'] = presentation_id unless presentation_id.nil?
187
187
  command.params['pageObjectId'] = page_object_id unless page_object_id.nil?
188
- command.query['quotaUser'] = quota_user unless quota_user.nil?
189
188
  command.query['fields'] = fields unless fields.nil?
189
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
190
190
  execute_or_queue_command(command, &block)
191
191
  end
192
192
 
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://cloud.google.com/speech/
26
26
  module SpeechV1beta1
27
27
  VERSION = 'V1beta1'
28
- REVISION = '20170125'
28
+ REVISION = '20170201'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -132,12 +132,12 @@ module Google
132
132
  end
133
133
  end
134
134
 
135
- # The `RecognitionConfig` message provides information to the recognizer
136
- # that specifies how to process the request.
135
+ # Provides information to the recognizer that specifies how to process the
136
+ # request.
137
137
  class RecognitionConfig
138
138
  include Google::Apis::Core::Hashable
139
139
 
140
- # [Optional] Maximum number of recognition hypotheses to be returned.
140
+ # *Optional* Maximum number of recognition hypotheses to be returned.
141
141
  # Specifically, the maximum number of `SpeechRecognitionAlternative` messages
142
142
  # within each `SpeechRecognitionResult`.
143
143
  # The server may return fewer than `max_alternatives`.
@@ -147,7 +147,7 @@ module Google
147
147
  # @return [Fixnum]
148
148
  attr_accessor :max_alternatives
149
149
 
150
- # [Required] Sample rate in Hertz of the audio data sent in all
150
+ # *Required* Sample rate in Hertz of the audio data sent in all
151
151
  # `RecognitionAudio` messages. Valid values are: 8000-48000.
152
152
  # 16000 is optimal. For best results, set the sampling rate of the audio
153
153
  # source to 16000 Hz. If that's not possible, use the native sample rate of
@@ -156,7 +156,7 @@ module Google
156
156
  # @return [Fixnum]
157
157
  attr_accessor :sample_rate
158
158
 
159
- # [Optional] The language of the supplied audio as a BCP-47 language tag.
159
+ # *Optional* The language of the supplied audio as a BCP-47 language tag.
160
160
  # Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt
161
161
  # If omitted, defaults to "en-US". See
162
162
  # [Language Support](https://cloud.google.com/speech/docs/languages)
@@ -165,18 +165,12 @@ module Google
165
165
  # @return [String]
166
166
  attr_accessor :language_code
167
167
 
168
- # Provides "hints" to the speech recognizer to favor specific words and phrases
169
- # in the results.
170
- # Corresponds to the JSON property `speechContext`
171
- # @return [Google::Apis::SpeechV1beta1::SpeechContext]
172
- attr_accessor :speech_context
173
-
174
- # [Required] Encoding of audio data sent in all `RecognitionAudio` messages.
168
+ # *Required* Encoding of audio data sent in all `RecognitionAudio` messages.
175
169
  # Corresponds to the JSON property `encoding`
176
170
  # @return [String]
177
171
  attr_accessor :encoding
178
172
 
179
- # [Optional] If set to `true`, the server will attempt to filter out
173
+ # *Optional* If set to `true`, the server will attempt to filter out
180
174
  # profanities, replacing all but the initial character in each filtered word
181
175
  # with asterisks, e.g. "f***". If set to `false` or omitted, profanities
182
176
  # won't be filtered out.
@@ -185,6 +179,12 @@ module Google
185
179
  attr_accessor :profanity_filter
186
180
  alias_method :profanity_filter?, :profanity_filter
187
181
 
182
+ # Provides "hints" to the speech recognizer to favor specific words and phrases
183
+ # in the results.
184
+ # Corresponds to the JSON property `speechContext`
185
+ # @return [Google::Apis::SpeechV1beta1::SpeechContext]
186
+ attr_accessor :speech_context
187
+
188
188
  def initialize(**args)
189
189
  update!(**args)
190
190
  end
@@ -194,19 +194,18 @@ module Google
194
194
  @max_alternatives = args[:max_alternatives] if args.key?(:max_alternatives)
195
195
  @sample_rate = args[:sample_rate] if args.key?(:sample_rate)
196
196
  @language_code = args[:language_code] if args.key?(:language_code)
197
- @speech_context = args[:speech_context] if args.key?(:speech_context)
198
197
  @encoding = args[:encoding] if args.key?(:encoding)
199
198
  @profanity_filter = args[:profanity_filter] if args.key?(:profanity_filter)
199
+ @speech_context = args[:speech_context] if args.key?(:speech_context)
200
200
  end
201
201
  end
202
202
 
203
- # `SyncRecognizeRequest` is the top-level message sent by the client for
204
- # the `SyncRecognize` method.
203
+ # The top-level message sent by the client for the `SyncRecognize` method.
205
204
  class SyncRecognizeRequest
206
205
  include Google::Apis::Core::Hashable
207
206
 
208
- # The `RecognitionConfig` message provides information to the recognizer
209
- # that specifies how to process the request.
207
+ # Provides information to the recognizer that specifies how to process the
208
+ # request.
210
209
  # Corresponds to the JSON property `config`
211
210
  # @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
212
211
  attr_accessor :config
@@ -302,13 +301,13 @@ module Google
302
301
  end
303
302
  end
304
303
 
305
- # `SyncRecognizeResponse` is the only message returned to the client by
306
- # `SyncRecognize`. It contains the result as zero or more sequential
307
- # `SpeechRecognitionResult` messages.
304
+ # The only message returned to the client by `SyncRecognize`. method. It
305
+ # contains the result as zero or more sequential `SpeechRecognitionResult`
306
+ # messages.
308
307
  class SyncRecognizeResponse
309
308
  include Google::Apis::Core::Hashable
310
309
 
311
- # [Output-only] Sequential list of transcription results corresponding to
310
+ # *Output-only* Sequential list of transcription results corresponding to
312
311
  # sequential portions of audio.
313
312
  # Corresponds to the JSON property `results`
314
313
  # @return [Array<Google::Apis::SpeechV1beta1::SpeechRecognitionResult>]
@@ -343,20 +342,25 @@ module Google
343
342
  end
344
343
  end
345
344
 
346
- # Provides "hints" to the speech recognizer to favor specific words and phrases
347
- # in the results.
348
- class SpeechContext
345
+ # Alternative hypotheses (a.k.a. n-best list).
346
+ class SpeechRecognitionAlternative
349
347
  include Google::Apis::Core::Hashable
350
348
 
351
- # [Optional] A list of strings containing words and phrases "hints" so that
352
- # the speech recognition is more likely to recognize them. This can be used
353
- # to improve the accuracy for specific words and phrases, for example, if
354
- # specific commands are typically spoken by the user. This can also be used
355
- # to add additional words to the vocabulary of the recognizer. See
356
- # [usage limits](https://cloud.google.com/speech/limits#content).
357
- # Corresponds to the JSON property `phrases`
358
- # @return [Array<String>]
359
- attr_accessor :phrases
349
+ # *Output-only* The confidence estimate between 0.0 and 1.0. A higher number
350
+ # indicates an estimated greater likelihood that the recognized words are
351
+ # correct. This field is typically provided only for the top hypothesis, and
352
+ # only for `is_final=true` results. Clients should not rely on the
353
+ # `confidence` field as it is not guaranteed to be accurate, or even set, in
354
+ # any of the results.
355
+ # The default of 0.0 is a sentinel value indicating `confidence` was not set.
356
+ # Corresponds to the JSON property `confidence`
357
+ # @return [Float]
358
+ attr_accessor :confidence
359
+
360
+ # *Output-only* Transcript text representing the words that the user spoke.
361
+ # Corresponds to the JSON property `transcript`
362
+ # @return [String]
363
+ attr_accessor :transcript
360
364
 
361
365
  def initialize(**args)
362
366
  update!(**args)
@@ -364,7 +368,8 @@ module Google
364
368
 
365
369
  # Update properties of this object
366
370
  def update!(**args)
367
- @phrases = args[:phrases] if args.key?(:phrases)
371
+ @confidence = args[:confidence] if args.key?(:confidence)
372
+ @transcript = args[:transcript] if args.key?(:transcript)
368
373
  end
369
374
  end
370
375
 
@@ -393,25 +398,20 @@ module Google
393
398
  end
394
399
  end
395
400
 
396
- # Alternative hypotheses (a.k.a. n-best list).
397
- class SpeechRecognitionAlternative
401
+ # Provides "hints" to the speech recognizer to favor specific words and phrases
402
+ # in the results.
403
+ class SpeechContext
398
404
  include Google::Apis::Core::Hashable
399
405
 
400
- # [Output-only] The confidence estimate between 0.0 and 1.0. A higher number
401
- # indicates an estimated greater likelihood that the recognized words are
402
- # correct. This field is typically provided only for the top hypothesis, and
403
- # only for `is_final=true` results. Clients should not rely on the
404
- # `confidence` field as it is not guaranteed to be accurate, or even set, in
405
- # any of the results.
406
- # The default of 0.0 is a sentinel value indicating `confidence` was not set.
407
- # Corresponds to the JSON property `confidence`
408
- # @return [Float]
409
- attr_accessor :confidence
410
-
411
- # [Output-only] Transcript text representing the words that the user spoke.
412
- # Corresponds to the JSON property `transcript`
413
- # @return [String]
414
- attr_accessor :transcript
406
+ # *Optional* A list of strings containing words and phrases "hints" so that
407
+ # the speech recognition is more likely to recognize them. This can be used
408
+ # to improve the accuracy for specific words and phrases, for example, if
409
+ # specific commands are typically spoken by the user. This can also be used
410
+ # to add additional words to the vocabulary of the recognizer. See
411
+ # [usage limits](https://cloud.google.com/speech/limits#content).
412
+ # Corresponds to the JSON property `phrases`
413
+ # @return [Array<String>]
414
+ attr_accessor :phrases
415
415
 
416
416
  def initialize(**args)
417
417
  update!(**args)
@@ -419,8 +419,7 @@ module Google
419
419
 
420
420
  # Update properties of this object
421
421
  def update!(**args)
422
- @confidence = args[:confidence] if args.key?(:confidence)
423
- @transcript = args[:transcript] if args.key?(:transcript)
422
+ @phrases = args[:phrases] if args.key?(:phrases)
424
423
  end
425
424
  end
426
425
 
@@ -428,7 +427,7 @@ module Google
428
427
  class SpeechRecognitionResult
429
428
  include Google::Apis::Core::Hashable
430
429
 
431
- # [Output-only] May contain one or more recognition hypotheses (up to the
430
+ # *Output-only* May contain one or more recognition hypotheses (up to the
432
431
  # maximum specified in `max_alternatives`).
433
432
  # Corresponds to the JSON property `alternatives`
434
433
  # @return [Array<Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative>]
@@ -479,13 +478,12 @@ module Google
479
478
  end
480
479
  end
481
480
 
482
- # `AsyncRecognizeRequest` is the top-level message sent by the client for
483
- # the `AsyncRecognize` method.
481
+ # The top-level message sent by the client for the `AsyncRecognize` method.
484
482
  class AsyncRecognizeRequest
485
483
  include Google::Apis::Core::Hashable
486
484
 
487
- # The `RecognitionConfig` message provides information to the recognizer
488
- # that specifies how to process the request.
485
+ # Provides information to the recognizer that specifies how to process the
486
+ # request.
489
487
  # Corresponds to the JSON property `config`
490
488
  # @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
491
489
  attr_accessor :config
@@ -64,7 +64,7 @@ module Google
64
64
  include Google::Apis::Core::JsonObjectSupport
65
65
  end
66
66
 
67
- class SpeechContext
67
+ class SpeechRecognitionAlternative
68
68
  class Representation < Google::Apis::Core::JsonRepresentation; end
69
69
 
70
70
  include Google::Apis::Core::JsonObjectSupport
@@ -76,7 +76,7 @@ module Google
76
76
  include Google::Apis::Core::JsonObjectSupport
77
77
  end
78
78
 
79
- class SpeechRecognitionAlternative
79
+ class SpeechContext
80
80
  class Representation < Google::Apis::Core::JsonRepresentation; end
81
81
 
82
82
  include Google::Apis::Core::JsonObjectSupport
@@ -124,10 +124,10 @@ module Google
124
124
  property :max_alternatives, as: 'maxAlternatives'
125
125
  property :sample_rate, as: 'sampleRate'
126
126
  property :language_code, as: 'languageCode'
127
- property :speech_context, as: 'speechContext', class: Google::Apis::SpeechV1beta1::SpeechContext, decorator: Google::Apis::SpeechV1beta1::SpeechContext::Representation
128
-
129
127
  property :encoding, as: 'encoding'
130
128
  property :profanity_filter, as: 'profanityFilter'
129
+ property :speech_context, as: 'speechContext', class: Google::Apis::SpeechV1beta1::SpeechContext, decorator: Google::Apis::SpeechV1beta1::SpeechContext::Representation
130
+
131
131
  end
132
132
  end
133
133
 
@@ -164,10 +164,11 @@ module Google
164
164
  end
165
165
  end
166
166
 
167
- class SpeechContext
167
+ class SpeechRecognitionAlternative
168
168
  # @private
169
169
  class Representation < Google::Apis::Core::JsonRepresentation
170
- collection :phrases, as: 'phrases'
170
+ property :confidence, as: 'confidence'
171
+ property :transcript, as: 'transcript'
171
172
  end
172
173
  end
173
174
 
@@ -180,11 +181,10 @@ module Google
180
181
  end
181
182
  end
182
183
 
183
- class SpeechRecognitionAlternative
184
+ class SpeechContext
184
185
  # @private
185
186
  class Representation < Google::Apis::Core::JsonRepresentation
186
- property :confidence, as: 'confidence'
187
- property :transcript, as: 'transcript'
187
+ collection :phrases, as: 'phrases'
188
188
  end
189
189
  end
190
190
 
@@ -46,18 +46,19 @@ module Google
46
46
  super('https://speech.googleapis.com/', '')
47
47
  end
48
48
 
49
- # Lists operations that match the specified filter in the request. If the
50
- # server doesn't support this method, it returns `UNIMPLEMENTED`.
51
- # NOTE: the `name` binding below allows API services to override the binding
52
- # to use different resource name schemes, such as `users/*/operations`.
53
- # @param [Fixnum] page_size
54
- # The standard list page size.
55
- # @param [String] filter
56
- # The standard list filter.
49
+ # Starts asynchronous cancellation on a long-running operation. The server
50
+ # makes a best effort to cancel the operation, but success is not
51
+ # guaranteed. If the server doesn't support this method, it returns
52
+ # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
53
+ # Operations.GetOperation or
54
+ # other methods to check whether the cancellation succeeded or whether the
55
+ # operation completed despite cancellation. On successful cancellation,
56
+ # the operation is not deleted; instead, it becomes an operation with
57
+ # an Operation.error value with a google.rpc.Status.code of 1,
58
+ # corresponding to `Code.CANCELLED`.
57
59
  # @param [String] name
58
- # The name of the operation collection.
59
- # @param [String] page_token
60
- # The standard list page token.
60
+ # The name of the operation resource to be cancelled.
61
+ # @param [Google::Apis::SpeechV1beta1::CancelOperationRequest] cancel_operation_request_object
61
62
  # @param [String] fields
62
63
  # Selector specifying which fields to include in a partial response.
63
64
  # @param [String] quota_user
@@ -67,32 +68,32 @@ module Google
67
68
  # Request-specific options
68
69
  #
69
70
  # @yield [result, err] Result & error if block supplied
70
- # @yieldparam result [Google::Apis::SpeechV1beta1::ListOperationsResponse] parsed result object
71
+ # @yieldparam result [Google::Apis::SpeechV1beta1::Empty] parsed result object
71
72
  # @yieldparam err [StandardError] error object if request failed
72
73
  #
73
- # @return [Google::Apis::SpeechV1beta1::ListOperationsResponse]
74
+ # @return [Google::Apis::SpeechV1beta1::Empty]
74
75
  #
75
76
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
77
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
78
  # @raise [Google::Apis::AuthorizationError] Authorization is required
78
- def list_operations(page_size: nil, filter: nil, name: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
79
- command = make_simple_command(:get, 'v1beta1/operations', options)
80
- command.response_representation = Google::Apis::SpeechV1beta1::ListOperationsResponse::Representation
81
- command.response_class = Google::Apis::SpeechV1beta1::ListOperationsResponse
82
- command.query['pageSize'] = page_size unless page_size.nil?
83
- command.query['filter'] = filter unless filter.nil?
84
- command.query['name'] = name unless name.nil?
85
- command.query['pageToken'] = page_token unless page_token.nil?
79
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
80
+ command = make_simple_command(:post, 'v1beta1/operations/{+name}:cancel', options)
81
+ command.request_representation = Google::Apis::SpeechV1beta1::CancelOperationRequest::Representation
82
+ command.request_object = cancel_operation_request_object
83
+ command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation
84
+ command.response_class = Google::Apis::SpeechV1beta1::Empty
85
+ command.params['name'] = name unless name.nil?
86
86
  command.query['fields'] = fields unless fields.nil?
87
87
  command.query['quotaUser'] = quota_user unless quota_user.nil?
88
88
  execute_or_queue_command(command, &block)
89
89
  end
90
90
 
91
- # Gets the latest state of a long-running operation. Clients can use this
92
- # method to poll the operation result at intervals as recommended by the API
93
- # service.
91
+ # Deletes a long-running operation. This method indicates that the client is
92
+ # no longer interested in the operation result. It does not cancel the
93
+ # operation. If the server doesn't support this method, it returns
94
+ # `google.rpc.Code.UNIMPLEMENTED`.
94
95
  # @param [String] name
95
- # The name of the operation resource.
96
+ # The name of the operation resource to be deleted.
96
97
  # @param [String] fields
97
98
  # Selector specifying which fields to include in a partial response.
98
99
  # @param [String] quota_user
@@ -102,37 +103,36 @@ module Google
102
103
  # Request-specific options
103
104
  #
104
105
  # @yield [result, err] Result & error if block supplied
105
- # @yieldparam result [Google::Apis::SpeechV1beta1::Operation] parsed result object
106
+ # @yieldparam result [Google::Apis::SpeechV1beta1::Empty] parsed result object
106
107
  # @yieldparam err [StandardError] error object if request failed
107
108
  #
108
- # @return [Google::Apis::SpeechV1beta1::Operation]
109
+ # @return [Google::Apis::SpeechV1beta1::Empty]
109
110
  #
110
111
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
112
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
113
  # @raise [Google::Apis::AuthorizationError] Authorization is required
113
- def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
114
- command = make_simple_command(:get, 'v1beta1/operations/{+name}', options)
115
- command.response_representation = Google::Apis::SpeechV1beta1::Operation::Representation
116
- command.response_class = Google::Apis::SpeechV1beta1::Operation
114
+ def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
115
+ command = make_simple_command(:delete, 'v1beta1/operations/{+name}', options)
116
+ command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation
117
+ command.response_class = Google::Apis::SpeechV1beta1::Empty
117
118
  command.params['name'] = name unless name.nil?
118
119
  command.query['fields'] = fields unless fields.nil?
119
120
  command.query['quotaUser'] = quota_user unless quota_user.nil?
120
121
  execute_or_queue_command(command, &block)
121
122
  end
122
123
 
123
- # Starts asynchronous cancellation on a long-running operation. The server
124
- # makes a best effort to cancel the operation, but success is not
125
- # guaranteed. If the server doesn't support this method, it returns
126
- # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
127
- # Operations.GetOperation or
128
- # other methods to check whether the cancellation succeeded or whether the
129
- # operation completed despite cancellation. On successful cancellation,
130
- # the operation is not deleted; instead, it becomes an operation with
131
- # an Operation.error value with a google.rpc.Status.code of 1,
132
- # corresponding to `Code.CANCELLED`.
124
+ # Lists operations that match the specified filter in the request. If the
125
+ # server doesn't support this method, it returns `UNIMPLEMENTED`.
126
+ # NOTE: the `name` binding below allows API services to override the binding
127
+ # to use different resource name schemes, such as `users/*/operations`.
128
+ # @param [String] filter
129
+ # The standard list filter.
133
130
  # @param [String] name
134
- # The name of the operation resource to be cancelled.
135
- # @param [Google::Apis::SpeechV1beta1::CancelOperationRequest] cancel_operation_request_object
131
+ # The name of the operation collection.
132
+ # @param [String] page_token
133
+ # The standard list page token.
134
+ # @param [Fixnum] page_size
135
+ # The standard list page size.
136
136
  # @param [String] fields
137
137
  # Selector specifying which fields to include in a partial response.
138
138
  # @param [String] quota_user
@@ -142,32 +142,32 @@ module Google
142
142
  # Request-specific options
143
143
  #
144
144
  # @yield [result, err] Result & error if block supplied
145
- # @yieldparam result [Google::Apis::SpeechV1beta1::Empty] parsed result object
145
+ # @yieldparam result [Google::Apis::SpeechV1beta1::ListOperationsResponse] parsed result object
146
146
  # @yieldparam err [StandardError] error object if request failed
147
147
  #
148
- # @return [Google::Apis::SpeechV1beta1::Empty]
148
+ # @return [Google::Apis::SpeechV1beta1::ListOperationsResponse]
149
149
  #
150
150
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
151
151
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
152
152
  # @raise [Google::Apis::AuthorizationError] Authorization is required
153
- def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
154
- command = make_simple_command(:post, 'v1beta1/operations/{+name}:cancel', options)
155
- command.request_representation = Google::Apis::SpeechV1beta1::CancelOperationRequest::Representation
156
- command.request_object = cancel_operation_request_object
157
- command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation
158
- command.response_class = Google::Apis::SpeechV1beta1::Empty
159
- command.params['name'] = name unless name.nil?
153
+ def list_operations(filter: nil, name: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
154
+ command = make_simple_command(:get, 'v1beta1/operations', options)
155
+ command.response_representation = Google::Apis::SpeechV1beta1::ListOperationsResponse::Representation
156
+ command.response_class = Google::Apis::SpeechV1beta1::ListOperationsResponse
157
+ command.query['filter'] = filter unless filter.nil?
158
+ command.query['name'] = name unless name.nil?
159
+ command.query['pageToken'] = page_token unless page_token.nil?
160
+ command.query['pageSize'] = page_size unless page_size.nil?
160
161
  command.query['fields'] = fields unless fields.nil?
161
162
  command.query['quotaUser'] = quota_user unless quota_user.nil?
162
163
  execute_or_queue_command(command, &block)
163
164
  end
164
165
 
165
- # Deletes a long-running operation. This method indicates that the client is
166
- # no longer interested in the operation result. It does not cancel the
167
- # operation. If the server doesn't support this method, it returns
168
- # `google.rpc.Code.UNIMPLEMENTED`.
166
+ # Gets the latest state of a long-running operation. Clients can use this
167
+ # method to poll the operation result at intervals as recommended by the API
168
+ # service.
169
169
  # @param [String] name
170
- # The name of the operation resource to be deleted.
170
+ # The name of the operation resource.
171
171
  # @param [String] fields
172
172
  # Selector specifying which fields to include in a partial response.
173
173
  # @param [String] quota_user
@@ -177,18 +177,18 @@ module Google
177
177
  # Request-specific options
178
178
  #
179
179
  # @yield [result, err] Result & error if block supplied
180
- # @yieldparam result [Google::Apis::SpeechV1beta1::Empty] parsed result object
180
+ # @yieldparam result [Google::Apis::SpeechV1beta1::Operation] parsed result object
181
181
  # @yieldparam err [StandardError] error object if request failed
182
182
  #
183
- # @return [Google::Apis::SpeechV1beta1::Empty]
183
+ # @return [Google::Apis::SpeechV1beta1::Operation]
184
184
  #
185
185
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
186
186
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
187
187
  # @raise [Google::Apis::AuthorizationError] Authorization is required
188
- def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
189
- command = make_simple_command(:delete, 'v1beta1/operations/{+name}', options)
190
- command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation
191
- command.response_class = Google::Apis::SpeechV1beta1::Empty
188
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
189
+ command = make_simple_command(:get, 'v1beta1/operations/{+name}', options)
190
+ command.response_representation = Google::Apis::SpeechV1beta1::Operation::Representation
191
+ command.response_class = Google::Apis::SpeechV1beta1::Operation
192
192
  command.params['name'] = name unless name.nil?
193
193
  command.query['fields'] = fields unless fields.nil?
194
194
  command.query['quotaUser'] = quota_user unless quota_user.nil?