google-cloud-dialogflow-v2 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +2 -1
  3. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -1
  4. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +5 -1
  5. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +1 -1
  6. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
  7. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +3 -0
  8. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +121 -23
  9. data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +19 -0
  10. data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +114 -23
  11. data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +60 -0
  12. data/lib/google/cloud/dialogflow/v2/encryption_spec_pb.rb +52 -0
  13. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/client.rb +567 -0
  14. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/credentials.rb +52 -0
  15. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/operations.rb +809 -0
  16. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/paths.rb +50 -0
  17. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/client.rb +535 -0
  18. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/operations.rb +922 -0
  19. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/service_stub.rb +188 -0
  20. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest.rb +54 -0
  21. data/lib/google/cloud/dialogflow/v2/encryption_spec_service.rb +56 -0
  22. data/lib/google/cloud/dialogflow/v2/encryption_spec_services_pb.rb +51 -0
  23. data/lib/google/cloud/dialogflow/v2/generator_pb.rb +71 -0
  24. data/lib/google/cloud/dialogflow/v2/generator_services_pb.rb +57 -0
  25. data/lib/google/cloud/dialogflow/v2/generators/client.rb +851 -0
  26. data/lib/google/cloud/dialogflow/v2/generators/credentials.rb +52 -0
  27. data/lib/google/cloud/dialogflow/v2/generators/paths.rb +66 -0
  28. data/lib/google/cloud/dialogflow/v2/generators/rest/client.rb +798 -0
  29. data/lib/google/cloud/dialogflow/v2/generators/rest/service_stub.rb +381 -0
  30. data/lib/google/cloud/dialogflow/v2/generators/rest.rb +57 -0
  31. data/lib/google/cloud/dialogflow/v2/generators.rb +59 -0
  32. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +9 -1
  33. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +2 -0
  34. data/lib/google/cloud/dialogflow/v2/participants/client.rb +110 -0
  35. data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +103 -0
  36. data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +68 -0
  37. data/lib/google/cloud/dialogflow/v2/rest.rb +2 -0
  38. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  39. data/lib/google/cloud/dialogflow/v2.rb +2 -0
  40. data/proto_docs/google/api/client.rb +14 -10
  41. data/proto_docs/google/api/resource.rb +7 -2
  42. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +22 -0
  43. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +24 -0
  44. data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +54 -26
  45. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +27 -2
  46. data/proto_docs/google/cloud/dialogflow/v2/encryption_spec.rb +81 -0
  47. data/proto_docs/google/cloud/dialogflow/v2/generator.rb +382 -0
  48. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +133 -0
  49. metadata +24 -2
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module V2
24
+ module EncryptionSpecService
25
+ # Path helper methods for the EncryptionSpecService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified EncryptionSpec resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/encryptionSpec`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ #
37
+ # @return [::String]
38
+ def encryption_spec_path project:, location:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/locations/#{location}/encryptionSpec"
42
+ end
43
+
44
+ extend self
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,535 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/dialogflow/v2/encryption_spec_pb"
21
+ require "google/cloud/dialogflow/v2/encryption_spec_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Dialogflow
27
+ module V2
28
+ module EncryptionSpecService
29
+ module Rest
30
+ ##
31
+ # REST client for the EncryptionSpecService service.
32
+ #
33
+ # Manages encryption spec settings for Dialogflow and Agent Assist.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :encryption_spec_service_stub
46
+
47
+ ##
48
+ # Configure the EncryptionSpecService Client class.
49
+ #
50
+ # See {::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all EncryptionSpecService clients
56
+ # ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "Dialogflow", "V2"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.timeout = 60.0
77
+ default_config.retry_policy = {
78
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config
82
+ end
83
+ yield @configure if block_given?
84
+ @configure
85
+ end
86
+
87
+ ##
88
+ # Configure the EncryptionSpecService Client instance.
89
+ #
90
+ # The configuration is set to the derived mode, meaning that values can be changed,
91
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
92
+ # should be made on {Client.configure}.
93
+ #
94
+ # See {::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client::Configuration}
95
+ # for a description of the configuration fields.
96
+ #
97
+ # @yield [config] Configure the Client client.
98
+ # @yieldparam config [Client::Configuration]
99
+ #
100
+ # @return [Client::Configuration]
101
+ #
102
+ def configure
103
+ yield @config if block_given?
104
+ @config
105
+ end
106
+
107
+ ##
108
+ # The effective universe domain
109
+ #
110
+ # @return [String]
111
+ #
112
+ def universe_domain
113
+ @encryption_spec_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new EncryptionSpecService REST client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the EncryptionSpecService client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+
152
+ @quota_project_id = @config.quota_project
153
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
+
155
+ @operations_client = ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Operations.new do |config|
156
+ config.credentials = credentials
157
+ config.quota_project = @quota_project_id
158
+ config.endpoint = @config.endpoint
159
+ config.universe_domain = @config.universe_domain
160
+ end
161
+
162
+ @encryption_spec_service_stub = ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::ServiceStub.new(
163
+ endpoint: @config.endpoint,
164
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
+ universe_domain: @config.universe_domain,
166
+ credentials: credentials
167
+ )
168
+
169
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
170
+ config.credentials = credentials
171
+ config.quota_project = @quota_project_id
172
+ config.endpoint = @encryption_spec_service_stub.endpoint
173
+ config.universe_domain = @encryption_spec_service_stub.universe_domain
174
+ config.bindings_override = @config.bindings_override
175
+ end
176
+ end
177
+
178
+ ##
179
+ # Get the associated client for long-running operations.
180
+ #
181
+ # @return [::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Operations]
182
+ #
183
+ attr_reader :operations_client
184
+
185
+ ##
186
+ # Get the associated client for mix-in of the Locations.
187
+ #
188
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
189
+ #
190
+ attr_reader :location_client
191
+
192
+ # Service calls
193
+
194
+ ##
195
+ # Gets location-level encryption key specification.
196
+ #
197
+ # @overload get_encryption_spec(request, options = nil)
198
+ # Pass arguments to `get_encryption_spec` via a request object, either of type
199
+ # {::Google::Cloud::Dialogflow::V2::GetEncryptionSpecRequest} or an equivalent Hash.
200
+ #
201
+ # @param request [::Google::Cloud::Dialogflow::V2::GetEncryptionSpecRequest, ::Hash]
202
+ # A request object representing the call parameters. Required. To specify no
203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
204
+ # @param options [::Gapic::CallOptions, ::Hash]
205
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
206
+ #
207
+ # @overload get_encryption_spec(name: nil)
208
+ # Pass arguments to `get_encryption_spec` via keyword arguments. Note that at
209
+ # least one keyword argument is required. To specify no parameters, or to keep all
210
+ # the default parameter values, pass an empty Hash as a request object (see above).
211
+ #
212
+ # @param name [::String]
213
+ # Required. The name of the encryption spec resource to get.
214
+ # @yield [result, operation] Access the result along with the TransportOperation object
215
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::EncryptionSpec]
216
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
217
+ #
218
+ # @return [::Google::Cloud::Dialogflow::V2::EncryptionSpec]
219
+ #
220
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
221
+ #
222
+ # @example Basic example
223
+ # require "google/cloud/dialogflow/v2"
224
+ #
225
+ # # Create a client object. The client can be reused for multiple calls.
226
+ # client = Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new
227
+ #
228
+ # # Create a request. To set request fields, pass in keyword arguments.
229
+ # request = Google::Cloud::Dialogflow::V2::GetEncryptionSpecRequest.new
230
+ #
231
+ # # Call the get_encryption_spec method.
232
+ # result = client.get_encryption_spec request
233
+ #
234
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::EncryptionSpec.
235
+ # p result
236
+ #
237
+ def get_encryption_spec request, options = nil
238
+ raise ::ArgumentError, "request must be provided" if request.nil?
239
+
240
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetEncryptionSpecRequest
241
+
242
+ # Converts hash and nil to an options object
243
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
244
+
245
+ # Customize the options with defaults
246
+ call_metadata = @config.rpcs.get_encryption_spec.metadata.to_h
247
+
248
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
249
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
250
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
251
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
252
+ transports_version_send: [:rest]
253
+
254
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
255
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
256
+
257
+ options.apply_defaults timeout: @config.rpcs.get_encryption_spec.timeout,
258
+ metadata: call_metadata,
259
+ retry_policy: @config.rpcs.get_encryption_spec.retry_policy
260
+
261
+ options.apply_defaults timeout: @config.timeout,
262
+ metadata: @config.metadata,
263
+ retry_policy: @config.retry_policy
264
+
265
+ @encryption_spec_service_stub.get_encryption_spec request, options do |result, operation|
266
+ yield result, operation if block_given?
267
+ return result
268
+ end
269
+ rescue ::Gapic::Rest::Error => e
270
+ raise ::Google::Cloud::Error.from_error(e)
271
+ end
272
+
273
+ ##
274
+ # Initializes a location-level encryption key specification. An error will
275
+ # be thrown if the location has resources already created before the
276
+ # initialization. Once the encryption specification is initialized at a
277
+ # location, it is immutable and all newly created resources under the
278
+ # location will be encrypted with the existing specification.
279
+ #
280
+ # @overload initialize_encryption_spec(request, options = nil)
281
+ # Pass arguments to `initialize_encryption_spec` via a request object, either of type
282
+ # {::Google::Cloud::Dialogflow::V2::InitializeEncryptionSpecRequest} or an equivalent Hash.
283
+ #
284
+ # @param request [::Google::Cloud::Dialogflow::V2::InitializeEncryptionSpecRequest, ::Hash]
285
+ # A request object representing the call parameters. Required. To specify no
286
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
287
+ # @param options [::Gapic::CallOptions, ::Hash]
288
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
289
+ #
290
+ # @overload initialize_encryption_spec(encryption_spec: nil)
291
+ # Pass arguments to `initialize_encryption_spec` via keyword arguments. Note that at
292
+ # least one keyword argument is required. To specify no parameters, or to keep all
293
+ # the default parameter values, pass an empty Hash as a request object (see above).
294
+ #
295
+ # @param encryption_spec [::Google::Cloud::Dialogflow::V2::EncryptionSpec, ::Hash]
296
+ # Required. The encryption spec used for CMEK encryption. It is required that
297
+ # the kms key is in the same region as the endpoint. The same key will be
298
+ # used for all provisioned resources, if encryption is available. If the
299
+ # kms_key_name is left empty, no encryption will be enforced.
300
+ # @yield [result, operation] Access the result along with the TransportOperation object
301
+ # @yieldparam result [::Gapic::Operation]
302
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
303
+ #
304
+ # @return [::Gapic::Operation]
305
+ #
306
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
307
+ #
308
+ # @example Basic example
309
+ # require "google/cloud/dialogflow/v2"
310
+ #
311
+ # # Create a client object. The client can be reused for multiple calls.
312
+ # client = Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new
313
+ #
314
+ # # Create a request. To set request fields, pass in keyword arguments.
315
+ # request = Google::Cloud::Dialogflow::V2::InitializeEncryptionSpecRequest.new
316
+ #
317
+ # # Call the initialize_encryption_spec method.
318
+ # result = client.initialize_encryption_spec request
319
+ #
320
+ # # The returned object is of type Gapic::Operation. You can use it to
321
+ # # check the status of an operation, cancel it, or wait for results.
322
+ # # Here is how to wait for a response.
323
+ # result.wait_until_done! timeout: 60
324
+ # if result.response?
325
+ # p result.response
326
+ # else
327
+ # puts "No response received."
328
+ # end
329
+ #
330
+ def initialize_encryption_spec request, options = nil
331
+ raise ::ArgumentError, "request must be provided" if request.nil?
332
+
333
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::InitializeEncryptionSpecRequest
334
+
335
+ # Converts hash and nil to an options object
336
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
337
+
338
+ # Customize the options with defaults
339
+ call_metadata = @config.rpcs.initialize_encryption_spec.metadata.to_h
340
+
341
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
342
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
343
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
344
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
345
+ transports_version_send: [:rest]
346
+
347
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
348
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
349
+
350
+ options.apply_defaults timeout: @config.rpcs.initialize_encryption_spec.timeout,
351
+ metadata: call_metadata,
352
+ retry_policy: @config.rpcs.initialize_encryption_spec.retry_policy
353
+
354
+ options.apply_defaults timeout: @config.timeout,
355
+ metadata: @config.metadata,
356
+ retry_policy: @config.retry_policy
357
+
358
+ @encryption_spec_service_stub.initialize_encryption_spec request, options do |result, operation|
359
+ result = ::Gapic::Operation.new result, @operations_client, options: options
360
+ yield result, operation if block_given?
361
+ return result
362
+ end
363
+ rescue ::Gapic::Rest::Error => e
364
+ raise ::Google::Cloud::Error.from_error(e)
365
+ end
366
+
367
+ ##
368
+ # Configuration class for the EncryptionSpecService REST API.
369
+ #
370
+ # This class represents the configuration for EncryptionSpecService REST,
371
+ # providing control over timeouts, retry behavior, logging, transport
372
+ # parameters, and other low-level controls. Certain parameters can also be
373
+ # applied individually to specific RPCs. See
374
+ # {::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client::Configuration::Rpcs}
375
+ # for a list of RPCs that can be configured independently.
376
+ #
377
+ # Configuration can be applied globally to all clients, or to a single client
378
+ # on construction.
379
+ #
380
+ # @example
381
+ #
382
+ # # Modify the global config, setting the timeout for
383
+ # # get_encryption_spec to 20 seconds,
384
+ # # and all remaining timeouts to 10 seconds.
385
+ # ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.configure do |config|
386
+ # config.timeout = 10.0
387
+ # config.rpcs.get_encryption_spec.timeout = 20.0
388
+ # end
389
+ #
390
+ # # Apply the above configuration only to a new client.
391
+ # client = ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new do |config|
392
+ # config.timeout = 10.0
393
+ # config.rpcs.get_encryption_spec.timeout = 20.0
394
+ # end
395
+ #
396
+ # @!attribute [rw] endpoint
397
+ # A custom service endpoint, as a hostname or hostname:port. The default is
398
+ # nil, indicating to use the default endpoint in the current universe domain.
399
+ # @return [::String,nil]
400
+ # @!attribute [rw] credentials
401
+ # Credentials to send with calls. You may provide any of the following types:
402
+ # * (`String`) The path to a service account key file in JSON format
403
+ # * (`Hash`) A service account key as a Hash
404
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
405
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
406
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
407
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
408
+ # * (`nil`) indicating no credentials
409
+ # @return [::Object]
410
+ # @!attribute [rw] scope
411
+ # The OAuth scopes
412
+ # @return [::Array<::String>]
413
+ # @!attribute [rw] lib_name
414
+ # The library name as recorded in instrumentation and logging
415
+ # @return [::String]
416
+ # @!attribute [rw] lib_version
417
+ # The library version as recorded in instrumentation and logging
418
+ # @return [::String]
419
+ # @!attribute [rw] timeout
420
+ # The call timeout in seconds.
421
+ # @return [::Numeric]
422
+ # @!attribute [rw] metadata
423
+ # Additional headers to be sent with the call.
424
+ # @return [::Hash{::Symbol=>::String}]
425
+ # @!attribute [rw] retry_policy
426
+ # The retry policy. The value is a hash with the following keys:
427
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
428
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
429
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
430
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
431
+ # trigger a retry.
432
+ # @return [::Hash]
433
+ # @!attribute [rw] quota_project
434
+ # A separate project against which to charge quota.
435
+ # @return [::String]
436
+ # @!attribute [rw] universe_domain
437
+ # The universe domain within which to make requests. This determines the
438
+ # default endpoint URL. The default value of nil uses the environment
439
+ # universe (usually the default "googleapis.com" universe).
440
+ # @return [::String,nil]
441
+ #
442
+ class Configuration
443
+ extend ::Gapic::Config
444
+
445
+ # @private
446
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
447
+ DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
448
+
449
+ config_attr :endpoint, nil, ::String, nil
450
+ config_attr :credentials, nil do |value|
451
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
+ allowed.any? { |klass| klass === value }
453
+ end
454
+ config_attr :scope, nil, ::String, ::Array, nil
455
+ config_attr :lib_name, nil, ::String, nil
456
+ config_attr :lib_version, nil, ::String, nil
457
+ config_attr :timeout, nil, ::Numeric, nil
458
+ config_attr :metadata, nil, ::Hash, nil
459
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
460
+ config_attr :quota_project, nil, ::String, nil
461
+ config_attr :universe_domain, nil, ::String, nil
462
+
463
+ # @private
464
+ # Overrides for http bindings for the RPCs of this service
465
+ # are only used when this service is used as mixin, and only
466
+ # by the host service.
467
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
468
+ config_attr :bindings_override, {}, ::Hash, nil
469
+
470
+ # @private
471
+ def initialize parent_config = nil
472
+ @parent_config = parent_config unless parent_config.nil?
473
+
474
+ yield self if block_given?
475
+ end
476
+
477
+ ##
478
+ # Configurations for individual RPCs
479
+ # @return [Rpcs]
480
+ #
481
+ def rpcs
482
+ @rpcs ||= begin
483
+ parent_rpcs = nil
484
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
485
+ Rpcs.new parent_rpcs
486
+ end
487
+ end
488
+
489
+ ##
490
+ # Configuration RPC class for the EncryptionSpecService API.
491
+ #
492
+ # Includes fields providing the configuration for each RPC in this service.
493
+ # Each configuration object is of type `Gapic::Config::Method` and includes
494
+ # the following configuration fields:
495
+ #
496
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
497
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
498
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
499
+ # include the following keys:
500
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
501
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
502
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
503
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
504
+ # trigger a retry.
505
+ #
506
+ class Rpcs
507
+ ##
508
+ # RPC-specific configuration for `get_encryption_spec`
509
+ # @return [::Gapic::Config::Method]
510
+ #
511
+ attr_reader :get_encryption_spec
512
+ ##
513
+ # RPC-specific configuration for `initialize_encryption_spec`
514
+ # @return [::Gapic::Config::Method]
515
+ #
516
+ attr_reader :initialize_encryption_spec
517
+
518
+ # @private
519
+ def initialize parent_rpcs = nil
520
+ get_encryption_spec_config = parent_rpcs.get_encryption_spec if parent_rpcs.respond_to? :get_encryption_spec
521
+ @get_encryption_spec = ::Gapic::Config::Method.new get_encryption_spec_config
522
+ initialize_encryption_spec_config = parent_rpcs.initialize_encryption_spec if parent_rpcs.respond_to? :initialize_encryption_spec
523
+ @initialize_encryption_spec = ::Gapic::Config::Method.new initialize_encryption_spec_config
524
+
525
+ yield self if block_given?
526
+ end
527
+ end
528
+ end
529
+ end
530
+ end
531
+ end
532
+ end
533
+ end
534
+ end
535
+ end