google-cloud-speech-v1 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/speech/v1/adaptation/client.rb +29 -11
- data/lib/google/cloud/speech/v1/adaptation/rest/client.rb +29 -11
- data/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb +94 -62
- data/lib/google/cloud/speech/v1/speech/client.rb +28 -4
- data/lib/google/cloud/speech/v1/speech/operations.rb +12 -15
- data/lib/google/cloud/speech/v1/speech/rest/client.rb +28 -3
- data/lib/google/cloud/speech/v1/speech/rest/operations.rb +43 -38
- data/lib/google/cloud/speech/v1/speech/rest/service_stub.rb +30 -14
- data/lib/google/cloud/speech/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +70 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8a964b9b1c07bc02ba96365d786c070ce939074953774892f116ee1fc75b6eb
|
4
|
+
data.tar.gz: 4ba5b2545e485035deb67662861f8a1b45ed0dbbab04cdc478b2e468fed4b06a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2399196e9cb6ffff7274a76f75b19d4f18c41d0ba009ba089dbed39d186216e1bb0b39e2ddf10b77faf58d8d0076e18e2eb640d191cb6948e00f963d6989cc7f
|
7
|
+
data.tar.gz: 37836baaddf9e23e68661b8a68f0656c30ba9a8e4c3529f5dfa35587d9b0c0c7bf555c7b877cc4e660afa3223cc971a2f6e898ad8a14a9c283a9da726005dc09
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/speech-to-text)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/speech/v1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -157,8 +157,28 @@ module Google
|
|
157
157
|
universe_domain: @config.universe_domain,
|
158
158
|
channel_args: @config.channel_args,
|
159
159
|
interceptors: @config.interceptors,
|
160
|
-
channel_pool_config: @config.channel_pool
|
160
|
+
channel_pool_config: @config.channel_pool,
|
161
|
+
logger: @config.logger
|
161
162
|
)
|
163
|
+
|
164
|
+
@adaptation_stub.stub_logger&.info do |entry|
|
165
|
+
entry.set_system_name
|
166
|
+
entry.set_service
|
167
|
+
entry.message = "Created client for #{entry.service}"
|
168
|
+
entry.set_credentials_fields credentials
|
169
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
170
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
171
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
##
|
176
|
+
# The logger used for request/response debug logging.
|
177
|
+
#
|
178
|
+
# @return [Logger]
|
179
|
+
#
|
180
|
+
def logger
|
181
|
+
@adaptation_stub.logger
|
162
182
|
end
|
163
183
|
|
164
184
|
# Service calls
|
@@ -262,7 +282,6 @@ module Google
|
|
262
282
|
|
263
283
|
@adaptation_stub.call_rpc :create_phrase_set, request, options: options do |response, operation|
|
264
284
|
yield response, operation if block_given?
|
265
|
-
return response
|
266
285
|
end
|
267
286
|
rescue ::GRPC::BadStatus => e
|
268
287
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -356,7 +375,6 @@ module Google
|
|
356
375
|
|
357
376
|
@adaptation_stub.call_rpc :get_phrase_set, request, options: options do |response, operation|
|
358
377
|
yield response, operation if block_given?
|
359
|
-
return response
|
360
378
|
end
|
361
379
|
rescue ::GRPC::BadStatus => e
|
362
380
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -466,7 +484,7 @@ module Google
|
|
466
484
|
@adaptation_stub.call_rpc :list_phrase_set, request, options: options do |response, operation|
|
467
485
|
response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_phrase_set, request, response, operation, options
|
468
486
|
yield response, operation if block_given?
|
469
|
-
|
487
|
+
throw :response, response
|
470
488
|
end
|
471
489
|
rescue ::GRPC::BadStatus => e
|
472
490
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -565,7 +583,6 @@ module Google
|
|
565
583
|
|
566
584
|
@adaptation_stub.call_rpc :update_phrase_set, request, options: options do |response, operation|
|
567
585
|
yield response, operation if block_given?
|
568
|
-
return response
|
569
586
|
end
|
570
587
|
rescue ::GRPC::BadStatus => e
|
571
588
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -653,7 +670,6 @@ module Google
|
|
653
670
|
|
654
671
|
@adaptation_stub.call_rpc :delete_phrase_set, request, options: options do |response, operation|
|
655
672
|
yield response, operation if block_given?
|
656
|
-
return response
|
657
673
|
end
|
658
674
|
rescue ::GRPC::BadStatus => e
|
659
675
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -756,7 +772,6 @@ module Google
|
|
756
772
|
|
757
773
|
@adaptation_stub.call_rpc :create_custom_class, request, options: options do |response, operation|
|
758
774
|
yield response, operation if block_given?
|
759
|
-
return response
|
760
775
|
end
|
761
776
|
rescue ::GRPC::BadStatus => e
|
762
777
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -844,7 +859,6 @@ module Google
|
|
844
859
|
|
845
860
|
@adaptation_stub.call_rpc :get_custom_class, request, options: options do |response, operation|
|
846
861
|
yield response, operation if block_given?
|
847
|
-
return response
|
848
862
|
end
|
849
863
|
rescue ::GRPC::BadStatus => e
|
850
864
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -954,7 +968,7 @@ module Google
|
|
954
968
|
@adaptation_stub.call_rpc :list_custom_classes, request, options: options do |response, operation|
|
955
969
|
response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_custom_classes, request, response, operation, options
|
956
970
|
yield response, operation if block_given?
|
957
|
-
|
971
|
+
throw :response, response
|
958
972
|
end
|
959
973
|
rescue ::GRPC::BadStatus => e
|
960
974
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1053,7 +1067,6 @@ module Google
|
|
1053
1067
|
|
1054
1068
|
@adaptation_stub.call_rpc :update_custom_class, request, options: options do |response, operation|
|
1055
1069
|
yield response, operation if block_given?
|
1056
|
-
return response
|
1057
1070
|
end
|
1058
1071
|
rescue ::GRPC::BadStatus => e
|
1059
1072
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1147,7 +1160,6 @@ module Google
|
|
1147
1160
|
|
1148
1161
|
@adaptation_stub.call_rpc :delete_custom_class, request, options: options do |response, operation|
|
1149
1162
|
yield response, operation if block_given?
|
1150
|
-
return response
|
1151
1163
|
end
|
1152
1164
|
rescue ::GRPC::BadStatus => e
|
1153
1165
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1236,6 +1248,11 @@ module Google
|
|
1236
1248
|
# default endpoint URL. The default value of nil uses the environment
|
1237
1249
|
# universe (usually the default "googleapis.com" universe).
|
1238
1250
|
# @return [::String,nil]
|
1251
|
+
# @!attribute [rw] logger
|
1252
|
+
# A custom logger to use for request/response debug logging, or the value
|
1253
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1254
|
+
# explicitly disable logging.
|
1255
|
+
# @return [::Logger,:default,nil]
|
1239
1256
|
#
|
1240
1257
|
class Configuration
|
1241
1258
|
extend ::Gapic::Config
|
@@ -1260,6 +1277,7 @@ module Google
|
|
1260
1277
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1261
1278
|
config_attr :quota_project, nil, ::String, nil
|
1262
1279
|
config_attr :universe_domain, nil, ::String, nil
|
1280
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1263
1281
|
|
1264
1282
|
# @private
|
1265
1283
|
def initialize parent_config = nil
|
@@ -150,8 +150,28 @@ module Google
|
|
150
150
|
endpoint: @config.endpoint,
|
151
151
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
152
152
|
universe_domain: @config.universe_domain,
|
153
|
-
credentials: credentials
|
153
|
+
credentials: credentials,
|
154
|
+
logger: @config.logger
|
154
155
|
)
|
156
|
+
|
157
|
+
@adaptation_stub.logger(stub: true)&.info do |entry|
|
158
|
+
entry.set_system_name
|
159
|
+
entry.set_service
|
160
|
+
entry.message = "Created client for #{entry.service}"
|
161
|
+
entry.set_credentials_fields credentials
|
162
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
163
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
164
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
##
|
169
|
+
# The logger used for request/response debug logging.
|
170
|
+
#
|
171
|
+
# @return [Logger]
|
172
|
+
#
|
173
|
+
def logger
|
174
|
+
@adaptation_stub.logger
|
155
175
|
end
|
156
176
|
|
157
177
|
# Service calls
|
@@ -248,7 +268,6 @@ module Google
|
|
248
268
|
|
249
269
|
@adaptation_stub.create_phrase_set request, options do |result, operation|
|
250
270
|
yield result, operation if block_given?
|
251
|
-
return result
|
252
271
|
end
|
253
272
|
rescue ::Gapic::Rest::Error => e
|
254
273
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -335,7 +354,6 @@ module Google
|
|
335
354
|
|
336
355
|
@adaptation_stub.get_phrase_set request, options do |result, operation|
|
337
356
|
yield result, operation if block_given?
|
338
|
-
return result
|
339
357
|
end
|
340
358
|
rescue ::Gapic::Rest::Error => e
|
341
359
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -438,7 +456,7 @@ module Google
|
|
438
456
|
@adaptation_stub.list_phrase_set request, options do |result, operation|
|
439
457
|
result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_phrase_set, "phrase_sets", request, result, options
|
440
458
|
yield result, operation if block_given?
|
441
|
-
|
459
|
+
throw :response, result
|
442
460
|
end
|
443
461
|
rescue ::Gapic::Rest::Error => e
|
444
462
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -530,7 +548,6 @@ module Google
|
|
530
548
|
|
531
549
|
@adaptation_stub.update_phrase_set request, options do |result, operation|
|
532
550
|
yield result, operation if block_given?
|
533
|
-
return result
|
534
551
|
end
|
535
552
|
rescue ::Gapic::Rest::Error => e
|
536
553
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -611,7 +628,6 @@ module Google
|
|
611
628
|
|
612
629
|
@adaptation_stub.delete_phrase_set request, options do |result, operation|
|
613
630
|
yield result, operation if block_given?
|
614
|
-
return result
|
615
631
|
end
|
616
632
|
rescue ::Gapic::Rest::Error => e
|
617
633
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -707,7 +723,6 @@ module Google
|
|
707
723
|
|
708
724
|
@adaptation_stub.create_custom_class request, options do |result, operation|
|
709
725
|
yield result, operation if block_given?
|
710
|
-
return result
|
711
726
|
end
|
712
727
|
rescue ::Gapic::Rest::Error => e
|
713
728
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -788,7 +803,6 @@ module Google
|
|
788
803
|
|
789
804
|
@adaptation_stub.get_custom_class request, options do |result, operation|
|
790
805
|
yield result, operation if block_given?
|
791
|
-
return result
|
792
806
|
end
|
793
807
|
rescue ::Gapic::Rest::Error => e
|
794
808
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -891,7 +905,7 @@ module Google
|
|
891
905
|
@adaptation_stub.list_custom_classes request, options do |result, operation|
|
892
906
|
result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_custom_classes, "custom_classes", request, result, options
|
893
907
|
yield result, operation if block_given?
|
894
|
-
|
908
|
+
throw :response, result
|
895
909
|
end
|
896
910
|
rescue ::Gapic::Rest::Error => e
|
897
911
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -983,7 +997,6 @@ module Google
|
|
983
997
|
|
984
998
|
@adaptation_stub.update_custom_class request, options do |result, operation|
|
985
999
|
yield result, operation if block_given?
|
986
|
-
return result
|
987
1000
|
end
|
988
1001
|
rescue ::Gapic::Rest::Error => e
|
989
1002
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1070,7 +1083,6 @@ module Google
|
|
1070
1083
|
|
1071
1084
|
@adaptation_stub.delete_custom_class request, options do |result, operation|
|
1072
1085
|
yield result, operation if block_given?
|
1073
|
-
return result
|
1074
1086
|
end
|
1075
1087
|
rescue ::Gapic::Rest::Error => e
|
1076
1088
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1150,6 +1162,11 @@ module Google
|
|
1150
1162
|
# default endpoint URL. The default value of nil uses the environment
|
1151
1163
|
# universe (usually the default "googleapis.com" universe).
|
1152
1164
|
# @return [::String,nil]
|
1165
|
+
# @!attribute [rw] logger
|
1166
|
+
# A custom logger to use for request/response debug logging, or the value
|
1167
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1168
|
+
# explicitly disable logging.
|
1169
|
+
# @return [::Logger,:default,nil]
|
1153
1170
|
#
|
1154
1171
|
class Configuration
|
1155
1172
|
extend ::Gapic::Config
|
@@ -1171,6 +1188,7 @@ module Google
|
|
1171
1188
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1172
1189
|
config_attr :quota_project, nil, ::String, nil
|
1173
1190
|
config_attr :universe_domain, nil, ::String, nil
|
1191
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1174
1192
|
|
1175
1193
|
# @private
|
1176
1194
|
def initialize parent_config = nil
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the create_phrase_set REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "create_phrase_set",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::Speech::V1::PhraseSet.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get_phrase_set",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::Speech::V1::PhraseSet.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "list_phrase_set",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Cloud::Speech::V1::ListPhraseSetResponse.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "update_phrase_set",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Cloud::Speech::V1::PhraseSet.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "delete_phrase_set",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -277,16 +299,18 @@ module Google
|
|
277
299
|
|
278
300
|
response = @client_stub.make_http_request(
|
279
301
|
verb,
|
280
|
-
uri:
|
281
|
-
body:
|
282
|
-
params:
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "create_custom_class",
|
283
306
|
options: options
|
284
307
|
)
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
286
309
|
result = ::Google::Cloud::Speech::V1::CustomClass.decode_json response.body, ignore_unknown_fields: true
|
287
|
-
|
288
|
-
|
289
|
-
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
290
314
|
end
|
291
315
|
|
292
316
|
##
|
@@ -315,16 +339,18 @@ module Google
|
|
315
339
|
|
316
340
|
response = @client_stub.make_http_request(
|
317
341
|
verb,
|
318
|
-
uri:
|
319
|
-
body:
|
320
|
-
params:
|
342
|
+
uri: uri,
|
343
|
+
body: body || "",
|
344
|
+
params: query_string_params,
|
345
|
+
method_name: "get_custom_class",
|
321
346
|
options: options
|
322
347
|
)
|
323
348
|
operation = ::Gapic::Rest::TransportOperation.new response
|
324
349
|
result = ::Google::Cloud::Speech::V1::CustomClass.decode_json response.body, ignore_unknown_fields: true
|
325
|
-
|
326
|
-
|
327
|
-
|
350
|
+
catch :response do
|
351
|
+
yield result, operation if block_given?
|
352
|
+
result
|
353
|
+
end
|
328
354
|
end
|
329
355
|
|
330
356
|
##
|
@@ -353,16 +379,18 @@ module Google
|
|
353
379
|
|
354
380
|
response = @client_stub.make_http_request(
|
355
381
|
verb,
|
356
|
-
uri:
|
357
|
-
body:
|
358
|
-
params:
|
382
|
+
uri: uri,
|
383
|
+
body: body || "",
|
384
|
+
params: query_string_params,
|
385
|
+
method_name: "list_custom_classes",
|
359
386
|
options: options
|
360
387
|
)
|
361
388
|
operation = ::Gapic::Rest::TransportOperation.new response
|
362
389
|
result = ::Google::Cloud::Speech::V1::ListCustomClassesResponse.decode_json response.body, ignore_unknown_fields: true
|
363
|
-
|
364
|
-
|
365
|
-
|
390
|
+
catch :response do
|
391
|
+
yield result, operation if block_given?
|
392
|
+
result
|
393
|
+
end
|
366
394
|
end
|
367
395
|
|
368
396
|
##
|
@@ -391,16 +419,18 @@ module Google
|
|
391
419
|
|
392
420
|
response = @client_stub.make_http_request(
|
393
421
|
verb,
|
394
|
-
uri:
|
395
|
-
body:
|
396
|
-
params:
|
422
|
+
uri: uri,
|
423
|
+
body: body || "",
|
424
|
+
params: query_string_params,
|
425
|
+
method_name: "update_custom_class",
|
397
426
|
options: options
|
398
427
|
)
|
399
428
|
operation = ::Gapic::Rest::TransportOperation.new response
|
400
429
|
result = ::Google::Cloud::Speech::V1::CustomClass.decode_json response.body, ignore_unknown_fields: true
|
401
|
-
|
402
|
-
|
403
|
-
|
430
|
+
catch :response do
|
431
|
+
yield result, operation if block_given?
|
432
|
+
result
|
433
|
+
end
|
404
434
|
end
|
405
435
|
|
406
436
|
##
|
@@ -429,16 +459,18 @@ module Google
|
|
429
459
|
|
430
460
|
response = @client_stub.make_http_request(
|
431
461
|
verb,
|
432
|
-
uri:
|
433
|
-
body:
|
434
|
-
params:
|
462
|
+
uri: uri,
|
463
|
+
body: body || "",
|
464
|
+
params: query_string_params,
|
465
|
+
method_name: "delete_custom_class",
|
435
466
|
options: options
|
436
467
|
)
|
437
468
|
operation = ::Gapic::Rest::TransportOperation.new response
|
438
469
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
439
|
-
|
440
|
-
|
441
|
-
|
470
|
+
catch :response do
|
471
|
+
yield result, operation if block_given?
|
472
|
+
result
|
473
|
+
end
|
442
474
|
end
|
443
475
|
|
444
476
|
##
|