google-api-client 0.9.8 → 0.9.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/Gemfile +9 -1
- data/README.md +10 -2
- data/api_names.yaml +63 -110
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
- data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +260 -13
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +81 -0
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
- data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +86 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +24 -0
- data/generated/google/apis/admin_directory_v1/service.rb +41 -2
- data/generated/google/apis/admin_reports_v1.rb +3 -3
- data/generated/google/apis/admin_reports_v1/service.rb +2 -2
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
- data/generated/google/apis/analytics_v3.rb +1 -1
- data/generated/google/apis/analytics_v3/classes.rb +379 -3
- data/generated/google/apis/analytics_v3/representations.rb +136 -0
- data/generated/google/apis/analytics_v3/service.rb +217 -0
- data/generated/google/apis/analyticsreporting_v4.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +813 -49
- data/generated/google/apis/androidenterprise_v1/representations.rb +336 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1234 -145
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +47 -8
- data/generated/google/apis/androidpublisher_v2/representations.rb +27 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +55 -0
- data/generated/google/apis/appengine_v1beta5.rb +7 -1
- data/generated/google/apis/appengine_v1beta5/classes.rb +516 -313
- data/generated/google/apis/appengine_v1beta5/representations.rb +115 -22
- data/generated/google/apis/appengine_v1beta5/service.rb +329 -33
- data/generated/google/apis/appsactivity_v1.rb +1 -1
- data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +277 -20
- data/generated/google/apis/bigquery_v2/representations.rb +86 -0
- data/generated/google/apis/bigquery_v2/service.rb +8 -2
- data/generated/google/apis/books_v1.rb +2 -2
- data/generated/google/apis/books_v1/classes.rb +79 -1
- data/generated/google/apis/books_v1/representations.rb +34 -0
- data/generated/google/apis/books_v1/service.rb +7 -3
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/civicinfo_v2.rb +3 -2
- data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
- data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
- data/generated/google/apis/civicinfo_v2/service.rb +27 -6
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/classes.rb +183 -37
- data/generated/google/apis/classroom_v1/representations.rb +74 -9
- data/generated/google/apis/classroom_v1/service.rb +403 -38
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +381 -17
- data/generated/google/apis/cloudbuild_v1/representations.rb +137 -2
- data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
- data/generated/google/apis/clouddebugger_v2.rb +3 -6
- data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +502 -111
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +162 -24
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +274 -30
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +121 -9
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +46 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +71 -58
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +2299 -434
- data/generated/google/apis/compute_beta/representations.rb +752 -33
- data/generated/google/apis/compute_beta/service.rb +6067 -3153
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +1681 -207
- data/generated/google/apis/compute_v1/representations.rb +552 -0
- data/generated/google/apis/compute_v1/service.rb +2797 -1171
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +757 -1
- data/generated/google/apis/content_v2/representations.rb +337 -0
- data/generated/google/apis/content_v2/service.rb +244 -0
- data/generated/google/apis/dataflow_v1b3.rb +38 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +4053 -0
- data/generated/google/apis/dataflow_v1b3/representations.rb +1736 -0
- data/generated/google/apis/dataflow_v1b3/service.rb +875 -0
- data/generated/google/apis/dataproc_v1.rb +2 -2
- data/generated/google/apis/dataproc_v1/classes.rb +213 -68
- data/generated/google/apis/dataproc_v1/representations.rb +38 -0
- data/generated/google/apis/dataproc_v1/service.rb +78 -48
- data/generated/google/apis/datastore_v1.rb +38 -0
- data/generated/google/apis/datastore_v1/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1/representations.rb +572 -0
- data/generated/google/apis/datastore_v1/service.rb +259 -0
- data/generated/google/apis/datastore_v1beta3.rb +38 -0
- data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
- data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
- data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +217 -55
- data/generated/google/apis/dfareporting_v2_5.rb +40 -0
- data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
- data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
- data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
- data/generated/google/apis/dfareporting_v2_6.rb +40 -0
- data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
- data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
- data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1/classes.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +27 -3
- data/generated/google/apis/drive_v2/representations.rb +4 -0
- data/generated/google/apis/drive_v2/service.rb +16 -3
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +50 -16
- data/generated/google/apis/drive_v3/representations.rb +4 -0
- data/generated/google/apis/drive_v3/service.rb +12 -2
- data/generated/google/apis/fitness_v1.rb +8 -2
- data/generated/google/apis/fitness_v1/classes.rb +64 -6
- data/generated/google/apis/fitness_v1/representations.rb +20 -0
- data/generated/google/apis/fitness_v1/service.rb +17 -18
- data/generated/google/apis/fusiontables_v2.rb +1 -1
- data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +2 -4
- data/generated/google/apis/genomics_v1/classes.rb +143 -34
- data/generated/google/apis/genomics_v1/representations.rb +48 -11
- data/generated/google/apis/genomics_v1/service.rb +35 -37
- data/generated/google/apis/gmail_v1.rb +10 -1
- data/generated/google/apis/gmail_v1/classes.rb +542 -4
- data/generated/google/apis/gmail_v1/representations.rb +213 -0
- data/generated/google/apis/gmail_v1/service.rb +898 -1
- data/generated/google/apis/groupssettings_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
- data/generated/google/apis/iam_v1.rb +2 -2
- data/generated/google/apis/iam_v1/classes.rb +181 -206
- data/generated/google/apis/iam_v1/representations.rb +36 -45
- data/generated/google/apis/iam_v1/service.rb +101 -67
- data/generated/google/apis/identitytoolkit_v3.rb +4 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +171 -1
- data/generated/google/apis/identitytoolkit_v3/representations.rb +26 -0
- data/generated/google/apis/language_v1beta1.rb +36 -0
- data/generated/google/apis/language_v1beta1/classes.rb +599 -0
- data/generated/google/apis/language_v1beta1/representations.rb +289 -0
- data/generated/google/apis/language_v1beta1/service.rb +152 -0
- data/generated/google/apis/logging_v2beta1.rb +6 -6
- data/generated/google/apis/logging_v2beta1/classes.rb +760 -731
- data/generated/google/apis/logging_v2beta1/representations.rb +136 -147
- data/generated/google/apis/logging_v2beta1/service.rb +290 -209
- data/generated/google/apis/mirror_v1.rb +2 -2
- data/generated/google/apis/mirror_v1/service.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +45 -0
- data/generated/google/apis/monitoring_v3/classes.rb +1337 -0
- data/generated/google/apis/monitoring_v3/representations.rb +516 -0
- data/generated/google/apis/monitoring_v3/service.rb +711 -0
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/pagespeedonline_v2.rb +1 -1
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1/classes.rb +10 -9
- data/generated/google/apis/pubsub_v1/service.rb +128 -27
- data/generated/google/apis/qpx_express_v1.rb +1 -1
- data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
- data/generated/google/apis/replicapool_v1beta2.rb +1 -1
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +6 -0
- data/generated/google/apis/script_v1/representations.rb +1 -0
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +910 -89
- data/generated/google/apis/sheets_v4/representations.rb +194 -10
- data/generated/google/apis/sheets_v4/service.rb +216 -49
- data/generated/google/apis/slides_v1.rb +49 -0
- data/generated/google/apis/slides_v1/classes.rb +3926 -0
- data/generated/google/apis/slides_v1/representations.rb +1722 -0
- data/generated/google/apis/slides_v1/service.rb +202 -0
- data/generated/google/apis/speech_v1beta1.rb +34 -0
- data/generated/google/apis/speech_v1beta1/classes.rb +511 -0
- data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
- data/generated/google/apis/speech_v1beta1/service.rb +271 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -8
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +3 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +43 -18
- data/generated/google/apis/storage_v1/representations.rb +4 -1
- data/generated/google/apis/storage_v1/service.rb +5 -2
- data/generated/google/apis/translate_v2.rb +2 -2
- data/generated/google/apis/translate_v2/service.rb +1 -1
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +12 -11
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +183 -21
- data/generated/google/apis/youtube_v3/representations.rb +85 -4
- data/generated/google/apis/youtube_v3/service.rb +41 -5
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/google-api-client.gemspec +2 -1
- data/lib/google/apis/core/api_command.rb +4 -0
- data/lib/google/apis/core/base_service.rb +10 -4
- data/lib/google/apis/core/download.rb +7 -2
- data/lib/google/apis/core/http_command.rb +5 -1
- data/lib/google/apis/core/upload.rb +7 -1
- data/lib/google/apis/errors.rb +2 -2
- data/lib/google/apis/generator/annotator.rb +6 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/bigquery.rb +101 -0
- data/samples/cli/lib/samples/sheets.rb +61 -0
- data/sync.rb +71 -0
- metadata +55 -13
@@ -0,0 +1,202 @@
|
|
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 SlidesV1
|
23
|
+
# Google Slides API
|
24
|
+
#
|
25
|
+
# An API for creating and editing Google Slides presentations.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/slides_v1'
|
29
|
+
#
|
30
|
+
# Slides = Google::Apis::SlidesV1 # Alias the module
|
31
|
+
# service = Slides::SlidesService.new
|
32
|
+
#
|
33
|
+
# @see https://developers.google.com/slides/
|
34
|
+
class SlidesService < 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://slides.googleapis.com/', '')
|
47
|
+
end
|
48
|
+
|
49
|
+
# Gets the latest version of the specified presentation.
|
50
|
+
# @param [String] presentation_id
|
51
|
+
# The ID of the presentation to retrieve.
|
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::SlidesV1::Presentation] parsed result object
|
62
|
+
# @yieldparam err [StandardError] error object if request failed
|
63
|
+
#
|
64
|
+
# @return [Google::Apis::SlidesV1::Presentation]
|
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 get_presentation(presentation_id, quota_user: nil, fields: nil, options: nil, &block)
|
70
|
+
command = make_simple_command(:get, 'v1/presentations/{+presentationId}', options)
|
71
|
+
command.response_representation = Google::Apis::SlidesV1::Presentation::Representation
|
72
|
+
command.response_class = Google::Apis::SlidesV1::Presentation
|
73
|
+
command.params['presentationId'] = presentation_id unless presentation_id.nil?
|
74
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
75
|
+
command.query['fields'] = fields unless fields.nil?
|
76
|
+
execute_or_queue_command(command, &block)
|
77
|
+
end
|
78
|
+
|
79
|
+
# Creates a new presentation using the title given in the request. Other
|
80
|
+
# fields in the request are ignored.
|
81
|
+
# Returns the created presentation.
|
82
|
+
# @param [Google::Apis::SlidesV1::Presentation] presentation_object
|
83
|
+
# @param [String] quota_user
|
84
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
85
|
+
# 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
|
+
# @param [Google::Apis::RequestOptions] options
|
89
|
+
# Request-specific options
|
90
|
+
#
|
91
|
+
# @yield [result, err] Result & error if block supplied
|
92
|
+
# @yieldparam result [Google::Apis::SlidesV1::Presentation] parsed result object
|
93
|
+
# @yieldparam err [StandardError] error object if request failed
|
94
|
+
#
|
95
|
+
# @return [Google::Apis::SlidesV1::Presentation]
|
96
|
+
#
|
97
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
98
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
99
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
100
|
+
def create_presentation(presentation_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
101
|
+
command = make_simple_command(:post, 'v1/presentations', options)
|
102
|
+
command.request_representation = Google::Apis::SlidesV1::Presentation::Representation
|
103
|
+
command.request_object = presentation_object
|
104
|
+
command.response_representation = Google::Apis::SlidesV1::Presentation::Representation
|
105
|
+
command.response_class = Google::Apis::SlidesV1::Presentation
|
106
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
107
|
+
command.query['fields'] = fields unless fields.nil?
|
108
|
+
execute_or_queue_command(command, &block)
|
109
|
+
end
|
110
|
+
|
111
|
+
# Applies one or more updates to the presentation.
|
112
|
+
# Each request is validated before
|
113
|
+
# being applied. If any request is not valid then the entire request will
|
114
|
+
# fail and nothing will be applied.
|
115
|
+
# Some requests have replies to
|
116
|
+
# give you some information about how they are applied. Other requests do
|
117
|
+
# not need to return information; these each return an empty reply.
|
118
|
+
# The order of replies matches that of the requests.
|
119
|
+
# For example, suppose you call batchUpdate with four updates, and only the
|
120
|
+
# third one returns information. The response would have two empty replies,
|
121
|
+
# the reply to the third request, and another empty reply, in that order.
|
122
|
+
# Because other users may be editing the presentation, it is not guaranteed
|
123
|
+
# that the presentation will exactly reflect your changes: your changes may
|
124
|
+
# be altered with respect to collaborator changes. If there are no
|
125
|
+
# collaborators, the presentation should reflect your changes. In any case,
|
126
|
+
# it is guaranteed that the updates in your request will be applied together
|
127
|
+
# atomically.
|
128
|
+
# @param [String] presentation_id
|
129
|
+
# The presentation to apply the updates to.
|
130
|
+
# @param [Google::Apis::SlidesV1::BatchUpdatePresentationRequest] batch_update_presentation_request_object
|
131
|
+
# @param [String] quota_user
|
132
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
133
|
+
# 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
|
+
# @param [Google::Apis::RequestOptions] options
|
137
|
+
# Request-specific options
|
138
|
+
#
|
139
|
+
# @yield [result, err] Result & error if block supplied
|
140
|
+
# @yieldparam result [Google::Apis::SlidesV1::BatchUpdatePresentationResponse] parsed result object
|
141
|
+
# @yieldparam err [StandardError] error object if request failed
|
142
|
+
#
|
143
|
+
# @return [Google::Apis::SlidesV1::BatchUpdatePresentationResponse]
|
144
|
+
#
|
145
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
146
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
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)
|
149
|
+
command = make_simple_command(:post, 'v1/presentations/{presentationId}:batchUpdate', options)
|
150
|
+
command.request_representation = Google::Apis::SlidesV1::BatchUpdatePresentationRequest::Representation
|
151
|
+
command.request_object = batch_update_presentation_request_object
|
152
|
+
command.response_representation = Google::Apis::SlidesV1::BatchUpdatePresentationResponse::Representation
|
153
|
+
command.response_class = Google::Apis::SlidesV1::BatchUpdatePresentationResponse
|
154
|
+
command.params['presentationId'] = presentation_id unless presentation_id.nil?
|
155
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
156
|
+
command.query['fields'] = fields unless fields.nil?
|
157
|
+
execute_or_queue_command(command, &block)
|
158
|
+
end
|
159
|
+
|
160
|
+
# Gets the latest version of the specified page in the presentation.
|
161
|
+
# @param [String] presentation_id
|
162
|
+
# The ID of the presentation to retrieve.
|
163
|
+
# @param [String] page_object_id
|
164
|
+
# The object ID of the page to retrieve.
|
165
|
+
# @param [String] quota_user
|
166
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
167
|
+
# 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
|
+
# @param [Google::Apis::RequestOptions] options
|
171
|
+
# Request-specific options
|
172
|
+
#
|
173
|
+
# @yield [result, err] Result & error if block supplied
|
174
|
+
# @yieldparam result [Google::Apis::SlidesV1::Page] parsed result object
|
175
|
+
# @yieldparam err [StandardError] error object if request failed
|
176
|
+
#
|
177
|
+
# @return [Google::Apis::SlidesV1::Page]
|
178
|
+
#
|
179
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
180
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
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)
|
183
|
+
command = make_simple_command(:get, 'v1/presentations/{presentationId}/pages/{pageObjectId}', options)
|
184
|
+
command.response_representation = Google::Apis::SlidesV1::Page::Representation
|
185
|
+
command.response_class = Google::Apis::SlidesV1::Page
|
186
|
+
command.params['presentationId'] = presentation_id unless presentation_id.nil?
|
187
|
+
command.params['pageObjectId'] = page_object_id unless page_object_id.nil?
|
188
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
189
|
+
command.query['fields'] = fields unless fields.nil?
|
190
|
+
execute_or_queue_command(command, &block)
|
191
|
+
end
|
192
|
+
|
193
|
+
protected
|
194
|
+
|
195
|
+
def apply_command_defaults(command)
|
196
|
+
command.query['key'] = key unless key.nil?
|
197
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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/speech_v1beta1/service.rb'
|
16
|
+
require 'google/apis/speech_v1beta1/classes.rb'
|
17
|
+
require 'google/apis/speech_v1beta1/representations.rb'
|
18
|
+
|
19
|
+
module Google
|
20
|
+
module Apis
|
21
|
+
# Google Cloud Speech API
|
22
|
+
#
|
23
|
+
# Google Cloud Speech API.
|
24
|
+
#
|
25
|
+
# @see https://cloud.google.com/speech/
|
26
|
+
module SpeechV1beta1
|
27
|
+
VERSION = 'V1beta1'
|
28
|
+
REVISION = '20161031'
|
29
|
+
|
30
|
+
# View and manage your data across Google Cloud Platform services
|
31
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,511 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module SpeechV1beta1
|
24
|
+
|
25
|
+
# The `Status` type defines a logical error model that is suitable for different
|
26
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
27
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
28
|
+
# - Simple to use and understand for most users
|
29
|
+
# - Flexible enough to meet unexpected needs
|
30
|
+
# # Overview
|
31
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
32
|
+
# and error details. The error code should be an enum value of
|
33
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
34
|
+
# error message should be a developer-facing English message that helps
|
35
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
36
|
+
# error message is needed, put the localized message in the error details or
|
37
|
+
# localize it in the client. The optional error details may contain arbitrary
|
38
|
+
# information about the error. There is a predefined set of error detail types
|
39
|
+
# in the package `google.rpc` which can be used for common error conditions.
|
40
|
+
# # Language mapping
|
41
|
+
# The `Status` message is the logical representation of the error model, but it
|
42
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
43
|
+
# exposed in different client libraries and different wire protocols, it can be
|
44
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
45
|
+
# in Java, but more likely mapped to some error codes in C.
|
46
|
+
# # Other uses
|
47
|
+
# The error model and the `Status` message can be used in a variety of
|
48
|
+
# environments, either with or without APIs, to provide a
|
49
|
+
# consistent developer experience across different environments.
|
50
|
+
# Example uses of this error model include:
|
51
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
52
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
53
|
+
# errors.
|
54
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
55
|
+
# have a `Status` message for error reporting purpose.
|
56
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
57
|
+
# `Status` message should be used directly inside batch response, one for
|
58
|
+
# each error sub-response.
|
59
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
60
|
+
# results in its response, the status of those operations should be
|
61
|
+
# represented directly using the `Status` message.
|
62
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
63
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
64
|
+
class Status
|
65
|
+
include Google::Apis::Core::Hashable
|
66
|
+
|
67
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
68
|
+
# Corresponds to the JSON property `code`
|
69
|
+
# @return [Fixnum]
|
70
|
+
attr_accessor :code
|
71
|
+
|
72
|
+
# A list of messages that carry the error details. There will be a
|
73
|
+
# common set of message types for APIs to use.
|
74
|
+
# Corresponds to the JSON property `details`
|
75
|
+
# @return [Array<Hash<String,Object>>]
|
76
|
+
attr_accessor :details
|
77
|
+
|
78
|
+
# A developer-facing error message, which should be in English. Any
|
79
|
+
# user-facing error message should be localized and sent in the
|
80
|
+
# google.rpc.Status.details field, or localized by the client.
|
81
|
+
# Corresponds to the JSON property `message`
|
82
|
+
# @return [String]
|
83
|
+
attr_accessor :message
|
84
|
+
|
85
|
+
def initialize(**args)
|
86
|
+
update!(**args)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Update properties of this object
|
90
|
+
def update!(**args)
|
91
|
+
@code = args[:code] if args.key?(:code)
|
92
|
+
@details = args[:details] if args.key?(:details)
|
93
|
+
@message = args[:message] if args.key?(:message)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
98
|
+
# Either `content` or `uri` must be supplied. Supplying both or neither
|
99
|
+
# returns google.rpc.Code.INVALID_ARGUMENT. See
|
100
|
+
# [audio limits](https://cloud.google.com/speech/limits#content).
|
101
|
+
class RecognitionAudio
|
102
|
+
include Google::Apis::Core::Hashable
|
103
|
+
|
104
|
+
# The audio data bytes encoded as specified in
|
105
|
+
# `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
|
106
|
+
# pure binary representation, whereas JSON representations use base64.
|
107
|
+
# Corresponds to the JSON property `content`
|
108
|
+
# @return [String]
|
109
|
+
attr_accessor :content
|
110
|
+
|
111
|
+
# URI that points to a file that contains audio data bytes as specified in
|
112
|
+
# `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
|
113
|
+
# supported, which must be specified in the following format:
|
114
|
+
# `gs://bucket_name/object_name` (other URI formats return
|
115
|
+
# google.rpc.Code.INVALID_ARGUMENT). For more information, see
|
116
|
+
# [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
|
117
|
+
# Corresponds to the JSON property `uri`
|
118
|
+
# @return [String]
|
119
|
+
attr_accessor :uri
|
120
|
+
|
121
|
+
def initialize(**args)
|
122
|
+
update!(**args)
|
123
|
+
end
|
124
|
+
|
125
|
+
# Update properties of this object
|
126
|
+
def update!(**args)
|
127
|
+
@content = args[:content] if args.key?(:content)
|
128
|
+
@uri = args[:uri] if args.key?(:uri)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# This resource represents a long-running operation that is the result of a
|
133
|
+
# network API call.
|
134
|
+
class Operation
|
135
|
+
include Google::Apis::Core::Hashable
|
136
|
+
|
137
|
+
# The `Status` type defines a logical error model that is suitable for different
|
138
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
139
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
140
|
+
# - Simple to use and understand for most users
|
141
|
+
# - Flexible enough to meet unexpected needs
|
142
|
+
# # Overview
|
143
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
144
|
+
# and error details. The error code should be an enum value of
|
145
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
146
|
+
# error message should be a developer-facing English message that helps
|
147
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
148
|
+
# error message is needed, put the localized message in the error details or
|
149
|
+
# localize it in the client. The optional error details may contain arbitrary
|
150
|
+
# information about the error. There is a predefined set of error detail types
|
151
|
+
# in the package `google.rpc` which can be used for common error conditions.
|
152
|
+
# # Language mapping
|
153
|
+
# The `Status` message is the logical representation of the error model, but it
|
154
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
155
|
+
# exposed in different client libraries and different wire protocols, it can be
|
156
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
157
|
+
# in Java, but more likely mapped to some error codes in C.
|
158
|
+
# # Other uses
|
159
|
+
# The error model and the `Status` message can be used in a variety of
|
160
|
+
# environments, either with or without APIs, to provide a
|
161
|
+
# consistent developer experience across different environments.
|
162
|
+
# Example uses of this error model include:
|
163
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
164
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
165
|
+
# errors.
|
166
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
167
|
+
# have a `Status` message for error reporting purpose.
|
168
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
169
|
+
# `Status` message should be used directly inside batch response, one for
|
170
|
+
# each error sub-response.
|
171
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
172
|
+
# results in its response, the status of those operations should be
|
173
|
+
# represented directly using the `Status` message.
|
174
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
175
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
176
|
+
# Corresponds to the JSON property `error`
|
177
|
+
# @return [Google::Apis::SpeechV1beta1::Status]
|
178
|
+
attr_accessor :error
|
179
|
+
|
180
|
+
# If the value is `false`, it means the operation is still in progress.
|
181
|
+
# If true, the operation is completed, and either `error` or `response` is
|
182
|
+
# available.
|
183
|
+
# Corresponds to the JSON property `done`
|
184
|
+
# @return [Boolean]
|
185
|
+
attr_accessor :done
|
186
|
+
alias_method :done?, :done
|
187
|
+
|
188
|
+
# Service-specific metadata associated with the operation. It typically
|
189
|
+
# contains progress information and common metadata such as create time.
|
190
|
+
# Some services might not provide such metadata. Any method that returns a
|
191
|
+
# long-running operation should document the metadata type, if any.
|
192
|
+
# Corresponds to the JSON property `metadata`
|
193
|
+
# @return [Hash<String,Object>]
|
194
|
+
attr_accessor :metadata
|
195
|
+
|
196
|
+
# The normal response of the operation in case of success. If the original
|
197
|
+
# method returns no data on success, such as `Delete`, the response is
|
198
|
+
# `google.protobuf.Empty`. If the original method is standard
|
199
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
200
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
201
|
+
# is the original method name. For example, if the original method name
|
202
|
+
# is `TakeSnapshot()`, the inferred response type is
|
203
|
+
# `TakeSnapshotResponse`.
|
204
|
+
# Corresponds to the JSON property `response`
|
205
|
+
# @return [Hash<String,Object>]
|
206
|
+
attr_accessor :response
|
207
|
+
|
208
|
+
# The server-assigned name, which is only unique within the same service that
|
209
|
+
# originally returns it. If you use the default HTTP mapping, the
|
210
|
+
# `name` should have the format of `operations/some/unique/name`.
|
211
|
+
# Corresponds to the JSON property `name`
|
212
|
+
# @return [String]
|
213
|
+
attr_accessor :name
|
214
|
+
|
215
|
+
def initialize(**args)
|
216
|
+
update!(**args)
|
217
|
+
end
|
218
|
+
|
219
|
+
# Update properties of this object
|
220
|
+
def update!(**args)
|
221
|
+
@error = args[:error] if args.key?(:error)
|
222
|
+
@done = args[:done] if args.key?(:done)
|
223
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
224
|
+
@response = args[:response] if args.key?(:response)
|
225
|
+
@name = args[:name] if args.key?(:name)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
# Alternative hypotheses (a.k.a. n-best list).
|
230
|
+
class SpeechRecognitionAlternative
|
231
|
+
include Google::Apis::Core::Hashable
|
232
|
+
|
233
|
+
# [Output-only] Transcript text representing the words that the user spoke.
|
234
|
+
# Corresponds to the JSON property `transcript`
|
235
|
+
# @return [String]
|
236
|
+
attr_accessor :transcript
|
237
|
+
|
238
|
+
# [Output-only] The confidence estimate between 0.0 and 1.0. A higher number
|
239
|
+
# means the system is more confident that the recognition is correct.
|
240
|
+
# This field is typically provided only for the top hypothesis, and only for
|
241
|
+
# `is_final=true` results.
|
242
|
+
# The default of 0.0 is a sentinel value indicating confidence was not set.
|
243
|
+
# Corresponds to the JSON property `confidence`
|
244
|
+
# @return [Float]
|
245
|
+
attr_accessor :confidence
|
246
|
+
|
247
|
+
def initialize(**args)
|
248
|
+
update!(**args)
|
249
|
+
end
|
250
|
+
|
251
|
+
# Update properties of this object
|
252
|
+
def update!(**args)
|
253
|
+
@transcript = args[:transcript] if args.key?(:transcript)
|
254
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
# The request message for Operations.CancelOperation.
|
259
|
+
class CancelOperationRequest
|
260
|
+
include Google::Apis::Core::Hashable
|
261
|
+
|
262
|
+
def initialize(**args)
|
263
|
+
update!(**args)
|
264
|
+
end
|
265
|
+
|
266
|
+
# Update properties of this object
|
267
|
+
def update!(**args)
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
# The `RecognitionConfig` message provides information to the recognizer
|
272
|
+
# that specifies how to process the request.
|
273
|
+
class RecognitionConfig
|
274
|
+
include Google::Apis::Core::Hashable
|
275
|
+
|
276
|
+
# [Optional] Maximum number of recognition hypotheses to be returned.
|
277
|
+
# Specifically, the maximum number of `SpeechRecognitionAlternative` messages
|
278
|
+
# within each `SpeechRecognitionResult`.
|
279
|
+
# The server may return fewer than `max_alternatives`.
|
280
|
+
# Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
|
281
|
+
# `1`. If omitted, defaults to `1`.
|
282
|
+
# Corresponds to the JSON property `maxAlternatives`
|
283
|
+
# @return [Fixnum]
|
284
|
+
attr_accessor :max_alternatives
|
285
|
+
|
286
|
+
# [Optional] The language of the supplied audio as a BCP-47 language tag.
|
287
|
+
# Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt
|
288
|
+
# If omitted, defaults to "en-US". See
|
289
|
+
# [Language Support](https://cloud.google.com/speech/docs/languages)
|
290
|
+
# for a list of the currently supported language codes.
|
291
|
+
# Corresponds to the JSON property `languageCode`
|
292
|
+
# @return [String]
|
293
|
+
attr_accessor :language_code
|
294
|
+
|
295
|
+
# Provides "hints" to the speech recognizer to favor specific words and phrases
|
296
|
+
# in the results.
|
297
|
+
# Corresponds to the JSON property `speechContext`
|
298
|
+
# @return [Google::Apis::SpeechV1beta1::SpeechContext]
|
299
|
+
attr_accessor :speech_context
|
300
|
+
|
301
|
+
# [Required] Encoding of audio data sent in all `RecognitionAudio` messages.
|
302
|
+
# Corresponds to the JSON property `encoding`
|
303
|
+
# @return [String]
|
304
|
+
attr_accessor :encoding
|
305
|
+
|
306
|
+
# [Optional] If set to `true`, the server will attempt to filter out
|
307
|
+
# profanities, replacing all but the initial character in each filtered word
|
308
|
+
# with asterisks, e.g. "f***". If set to `false` or omitted, profanities
|
309
|
+
# won't be filtered out.
|
310
|
+
# Corresponds to the JSON property `profanityFilter`
|
311
|
+
# @return [Boolean]
|
312
|
+
attr_accessor :profanity_filter
|
313
|
+
alias_method :profanity_filter?, :profanity_filter
|
314
|
+
|
315
|
+
# [Required] Sample rate in Hertz of the audio data sent in all
|
316
|
+
# `RecognitionAudio` messages. Valid values are: 8000-48000.
|
317
|
+
# 16000 is optimal. For best results, set the sampling rate of the audio
|
318
|
+
# source to 16000 Hz. If that's not possible, use the native sample rate of
|
319
|
+
# the audio source (instead of re-sampling).
|
320
|
+
# Corresponds to the JSON property `sampleRate`
|
321
|
+
# @return [Fixnum]
|
322
|
+
attr_accessor :sample_rate
|
323
|
+
|
324
|
+
def initialize(**args)
|
325
|
+
update!(**args)
|
326
|
+
end
|
327
|
+
|
328
|
+
# Update properties of this object
|
329
|
+
def update!(**args)
|
330
|
+
@max_alternatives = args[:max_alternatives] if args.key?(:max_alternatives)
|
331
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
332
|
+
@speech_context = args[:speech_context] if args.key?(:speech_context)
|
333
|
+
@encoding = args[:encoding] if args.key?(:encoding)
|
334
|
+
@profanity_filter = args[:profanity_filter] if args.key?(:profanity_filter)
|
335
|
+
@sample_rate = args[:sample_rate] if args.key?(:sample_rate)
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
339
|
+
# `SyncRecognizeRequest` is the top-level message sent by the client for
|
340
|
+
# the `SyncRecognize` method.
|
341
|
+
class SyncRecognizeRequest
|
342
|
+
include Google::Apis::Core::Hashable
|
343
|
+
|
344
|
+
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
345
|
+
# Either `content` or `uri` must be supplied. Supplying both or neither
|
346
|
+
# returns google.rpc.Code.INVALID_ARGUMENT. See
|
347
|
+
# [audio limits](https://cloud.google.com/speech/limits#content).
|
348
|
+
# Corresponds to the JSON property `audio`
|
349
|
+
# @return [Google::Apis::SpeechV1beta1::RecognitionAudio]
|
350
|
+
attr_accessor :audio
|
351
|
+
|
352
|
+
# The `RecognitionConfig` message provides information to the recognizer
|
353
|
+
# that specifies how to process the request.
|
354
|
+
# Corresponds to the JSON property `config`
|
355
|
+
# @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
|
356
|
+
attr_accessor :config
|
357
|
+
|
358
|
+
def initialize(**args)
|
359
|
+
update!(**args)
|
360
|
+
end
|
361
|
+
|
362
|
+
# Update properties of this object
|
363
|
+
def update!(**args)
|
364
|
+
@audio = args[:audio] if args.key?(:audio)
|
365
|
+
@config = args[:config] if args.key?(:config)
|
366
|
+
end
|
367
|
+
end
|
368
|
+
|
369
|
+
# A speech recognition result corresponding to a portion of the audio.
|
370
|
+
class SpeechRecognitionResult
|
371
|
+
include Google::Apis::Core::Hashable
|
372
|
+
|
373
|
+
# [Output-only] May contain one or more recognition hypotheses (up to the
|
374
|
+
# maximum specified in `max_alternatives`).
|
375
|
+
# Corresponds to the JSON property `alternatives`
|
376
|
+
# @return [Array<Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative>]
|
377
|
+
attr_accessor :alternatives
|
378
|
+
|
379
|
+
def initialize(**args)
|
380
|
+
update!(**args)
|
381
|
+
end
|
382
|
+
|
383
|
+
# Update properties of this object
|
384
|
+
def update!(**args)
|
385
|
+
@alternatives = args[:alternatives] if args.key?(:alternatives)
|
386
|
+
end
|
387
|
+
end
|
388
|
+
|
389
|
+
# The response message for Operations.ListOperations.
|
390
|
+
class ListOperationsResponse
|
391
|
+
include Google::Apis::Core::Hashable
|
392
|
+
|
393
|
+
# The standard List next-page token.
|
394
|
+
# Corresponds to the JSON property `nextPageToken`
|
395
|
+
# @return [String]
|
396
|
+
attr_accessor :next_page_token
|
397
|
+
|
398
|
+
# A list of operations that matches the specified filter in the request.
|
399
|
+
# Corresponds to the JSON property `operations`
|
400
|
+
# @return [Array<Google::Apis::SpeechV1beta1::Operation>]
|
401
|
+
attr_accessor :operations
|
402
|
+
|
403
|
+
def initialize(**args)
|
404
|
+
update!(**args)
|
405
|
+
end
|
406
|
+
|
407
|
+
# Update properties of this object
|
408
|
+
def update!(**args)
|
409
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
410
|
+
@operations = args[:operations] if args.key?(:operations)
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
414
|
+
# A generic empty message that you can re-use to avoid defining duplicated
|
415
|
+
# empty messages in your APIs. A typical example is to use it as the request
|
416
|
+
# or the response type of an API method. For instance:
|
417
|
+
# service Foo `
|
418
|
+
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
419
|
+
# `
|
420
|
+
# The JSON representation for `Empty` is empty JSON object ````.
|
421
|
+
class Empty
|
422
|
+
include Google::Apis::Core::Hashable
|
423
|
+
|
424
|
+
def initialize(**args)
|
425
|
+
update!(**args)
|
426
|
+
end
|
427
|
+
|
428
|
+
# Update properties of this object
|
429
|
+
def update!(**args)
|
430
|
+
end
|
431
|
+
end
|
432
|
+
|
433
|
+
# `SyncRecognizeResponse` is the only message returned to the client by
|
434
|
+
# `SyncRecognize`. It contains the result as zero or more sequential
|
435
|
+
# `SpeechRecognitionResult` messages.
|
436
|
+
class SyncRecognizeResponse
|
437
|
+
include Google::Apis::Core::Hashable
|
438
|
+
|
439
|
+
# [Output-only] Sequential list of transcription results corresponding to
|
440
|
+
# sequential portions of audio.
|
441
|
+
# Corresponds to the JSON property `results`
|
442
|
+
# @return [Array<Google::Apis::SpeechV1beta1::SpeechRecognitionResult>]
|
443
|
+
attr_accessor :results
|
444
|
+
|
445
|
+
def initialize(**args)
|
446
|
+
update!(**args)
|
447
|
+
end
|
448
|
+
|
449
|
+
# Update properties of this object
|
450
|
+
def update!(**args)
|
451
|
+
@results = args[:results] if args.key?(:results)
|
452
|
+
end
|
453
|
+
end
|
454
|
+
|
455
|
+
# Provides "hints" to the speech recognizer to favor specific words and phrases
|
456
|
+
# in the results.
|
457
|
+
class SpeechContext
|
458
|
+
include Google::Apis::Core::Hashable
|
459
|
+
|
460
|
+
# [Optional] A list of strings containing words and phrases "hints" so that
|
461
|
+
# the speech recognition is more likely to recognize them. This can be used
|
462
|
+
# to improve the accuracy for specific words and phrases, for example, if
|
463
|
+
# specific commands are typically spoken by the user. This can also be used
|
464
|
+
# to add additional words to the vocabulary of the recognizer. See
|
465
|
+
# [usage limits](https://cloud.google.com/speech/limits#content).
|
466
|
+
# Corresponds to the JSON property `phrases`
|
467
|
+
# @return [Array<String>]
|
468
|
+
attr_accessor :phrases
|
469
|
+
|
470
|
+
def initialize(**args)
|
471
|
+
update!(**args)
|
472
|
+
end
|
473
|
+
|
474
|
+
# Update properties of this object
|
475
|
+
def update!(**args)
|
476
|
+
@phrases = args[:phrases] if args.key?(:phrases)
|
477
|
+
end
|
478
|
+
end
|
479
|
+
|
480
|
+
# `AsyncRecognizeRequest` is the top-level message sent by the client for
|
481
|
+
# the `AsyncRecognize` method.
|
482
|
+
class AsyncRecognizeRequest
|
483
|
+
include Google::Apis::Core::Hashable
|
484
|
+
|
485
|
+
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
486
|
+
# Either `content` or `uri` must be supplied. Supplying both or neither
|
487
|
+
# returns google.rpc.Code.INVALID_ARGUMENT. See
|
488
|
+
# [audio limits](https://cloud.google.com/speech/limits#content).
|
489
|
+
# Corresponds to the JSON property `audio`
|
490
|
+
# @return [Google::Apis::SpeechV1beta1::RecognitionAudio]
|
491
|
+
attr_accessor :audio
|
492
|
+
|
493
|
+
# The `RecognitionConfig` message provides information to the recognizer
|
494
|
+
# that specifies how to process the request.
|
495
|
+
# Corresponds to the JSON property `config`
|
496
|
+
# @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
|
497
|
+
attr_accessor :config
|
498
|
+
|
499
|
+
def initialize(**args)
|
500
|
+
update!(**args)
|
501
|
+
end
|
502
|
+
|
503
|
+
# Update properties of this object
|
504
|
+
def update!(**args)
|
505
|
+
@audio = args[:audio] if args.key?(:audio)
|
506
|
+
@config = args[:config] if args.key?(:config)
|
507
|
+
end
|
508
|
+
end
|
509
|
+
end
|
510
|
+
end
|
511
|
+
end
|