google-cloud-dialogflow-cx-v3 0.2.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +201 -27
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +115 -12
  6. data/lib/google/cloud/dialogflow/cx/v3/changelog_pb.rb +52 -0
  7. data/lib/google/cloud/dialogflow/cx/v3/changelog_services_pb.rb +49 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +522 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/changelogs/credentials.rb +54 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/changelogs/paths.rb +75 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +51 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +46 -6
  13. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +106 -15
  14. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +1 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +227 -27
  16. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +115 -12
  17. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +146 -21
  18. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +228 -30
  19. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +115 -12
  20. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +106 -15
  21. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +106 -15
  22. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +7 -0
  23. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +106 -15
  24. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +106 -15
  25. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +84 -9
  26. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +281 -36
  27. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +115 -12
  28. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +106 -15
  29. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  30. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +12 -0
  31. data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +2 -0
  32. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +250 -18
  33. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +115 -12
  34. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +2 -0
  35. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +106 -15
  36. data/lib/google/cloud/dialogflow/cx/v3.rb +2 -1
  37. data/proto_docs/google/api/resource.rb +10 -71
  38. data/proto_docs/google/cloud/dialogflow/cx/v3/changelog.rb +122 -0
  39. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +15 -0
  40. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +11 -1
  41. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +54 -42
  42. data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +43 -0
  43. data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +17 -0
  44. metadata +10 -3
@@ -0,0 +1,49 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/dialogflow/cx/v3/changelog.proto for package 'Google.Cloud.Dialogflow.CX.V3'
3
+ # Original file comments:
4
+ # Copyright 2021 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/dialogflow/cx/v3/changelog_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module Changelogs
28
+ # Service for managing [Changelogs][google.cloud.dialogflow.cx.v3.Changelog].
29
+ class Service
30
+
31
+ include ::GRPC::GenericService
32
+
33
+ self.marshal_class_method = :encode
34
+ self.unmarshal_class_method = :decode
35
+ self.service_name = 'google.cloud.dialogflow.cx.v3.Changelogs'
36
+
37
+ # Returns the list of Changelogs.
38
+ rpc :ListChangelogs, ::Google::Cloud::Dialogflow::CX::V3::ListChangelogsRequest, ::Google::Cloud::Dialogflow::CX::V3::ListChangelogsResponse
39
+ # Retrieves the specified Changelog.
40
+ rpc :GetChangelog, ::Google::Cloud::Dialogflow::CX::V3::GetChangelogRequest, ::Google::Cloud::Dialogflow::CX::V3::Changelog
41
+ end
42
+
43
+ Stub = Service.rpc_stub_class
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,522 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/cx/v3/changelog_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module Changelogs
28
+ ##
29
+ # Client for the Changelogs service.
30
+ #
31
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Changelog Changelogs}.
32
+ #
33
+ class Client
34
+ include Paths
35
+
36
+ # @private
37
+ attr_reader :changelogs_stub
38
+
39
+ ##
40
+ # Configure the Changelogs Client class.
41
+ #
42
+ # See {::Google::Cloud::Dialogflow::CX::V3::Changelogs::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all Changelogs clients
48
+ # ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
51
+ #
52
+ # @yield [config] Configure the Client client.
53
+ # @yieldparam config [Client::Configuration]
54
+ #
55
+ # @return [Client::Configuration]
56
+ #
57
+ def self.configure
58
+ @configure ||= begin
59
+ namespace = ["Google", "Cloud", "Dialogflow", "CX", "V3"]
60
+ parent_config = while namespace.any?
61
+ parent_name = namespace.join "::"
62
+ parent_const = const_get parent_name
63
+ break parent_const.configure if parent_const.respond_to? :configure
64
+ namespace.pop
65
+ end
66
+ default_config = Client::Configuration.new parent_config
67
+
68
+ default_config.timeout = 60.0
69
+ default_config.retry_policy = {
70
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
71
+ }
72
+
73
+ default_config
74
+ end
75
+ yield @configure if block_given?
76
+ @configure
77
+ end
78
+
79
+ ##
80
+ # Configure the Changelogs Client instance.
81
+ #
82
+ # The configuration is set to the derived mode, meaning that values can be changed,
83
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
84
+ # should be made on {Client.configure}.
85
+ #
86
+ # See {::Google::Cloud::Dialogflow::CX::V3::Changelogs::Client::Configuration}
87
+ # for a description of the configuration fields.
88
+ #
89
+ # @yield [config] Configure the Client client.
90
+ # @yieldparam config [Client::Configuration]
91
+ #
92
+ # @return [Client::Configuration]
93
+ #
94
+ def configure
95
+ yield @config if block_given?
96
+ @config
97
+ end
98
+
99
+ ##
100
+ # Create a new Changelogs client object.
101
+ #
102
+ # @example
103
+ #
104
+ # # Create a client using the default configuration
105
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Client.new
106
+ #
107
+ # # Create a client using a custom configuration
108
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the Changelogs client.
113
+ # @yieldparam config [Client::Configuration]
114
+ #
115
+ def initialize
116
+ # These require statements are intentionally placed here to initialize
117
+ # the gRPC module only when it's required.
118
+ # See https://github.com/googleapis/toolkit/issues/446
119
+ require "gapic/grpc"
120
+ require "google/cloud/dialogflow/cx/v3/changelog_services_pb"
121
+
122
+ # Create the configuration object
123
+ @config = Configuration.new Client.configure
124
+
125
+ # Yield the configuration if needed
126
+ yield @config if block_given?
127
+
128
+ # Create credentials
129
+ credentials = @config.credentials
130
+ # Use self-signed JWT if the endpoint is unchanged from default,
131
+ # but only if the default endpoint does not have a region prefix.
132
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
+ !@config.endpoint.split(".").first.include?("-")
134
+ credentials ||= Credentials.default scope: @config.scope,
135
+ enable_self_signed_jwt: enable_self_signed_jwt
136
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
+ credentials = Credentials.new credentials, scope: @config.scope
138
+ end
139
+ @quota_project_id = @config.quota_project
140
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
141
+
142
+ @changelogs_stub = ::Gapic::ServiceStub.new(
143
+ ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Stub,
144
+ credentials: credentials,
145
+ endpoint: @config.endpoint,
146
+ channel_args: @config.channel_args,
147
+ interceptors: @config.interceptors
148
+ )
149
+ end
150
+
151
+ # Service calls
152
+
153
+ ##
154
+ # Returns the list of Changelogs.
155
+ #
156
+ # @overload list_changelogs(request, options = nil)
157
+ # Pass arguments to `list_changelogs` via a request object, either of type
158
+ # {::Google::Cloud::Dialogflow::CX::V3::ListChangelogsRequest} or an equivalent Hash.
159
+ #
160
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ListChangelogsRequest, ::Hash]
161
+ # A request object representing the call parameters. Required. To specify no
162
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
163
+ # @param options [::Gapic::CallOptions, ::Hash]
164
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
165
+ #
166
+ # @overload list_changelogs(parent: nil, filter: nil, page_size: nil, page_token: nil)
167
+ # Pass arguments to `list_changelogs` via keyword arguments. Note that at
168
+ # least one keyword argument is required. To specify no parameters, or to keep all
169
+ # the default parameter values, pass an empty Hash as a request object (see above).
170
+ #
171
+ # @param parent [::String]
172
+ # Required. The agent containing the changelogs.
173
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
174
+ # @param filter [::String]
175
+ # The filter string. Supports filter by user_email, resource, type and
176
+ # create_time. Some examples:
177
+ # 1. By user email:
178
+ # user_email = "someone@google.com"
179
+ # 2. By resource name:
180
+ # resource = "projects/123/locations/global/agents/456/flows/789"
181
+ # 3. By resource display name:
182
+ # display_name = "my agent"
183
+ # 4. By action:
184
+ # action = "Create"
185
+ # 5. By type:
186
+ # type = "flows"
187
+ # 6. By create time. Currently predicates on `create_time` and
188
+ # `create_time_epoch_seconds` are supported:
189
+ # create_time_epoch_seconds > 1551790877 AND create_time <=
190
+ # 2017-01-15T01:30:15.01Z
191
+ # 7. Combination of above filters:
192
+ # resource = "projects/123/locations/global/agents/456/flows/789"
193
+ # AND user_email = "someone@google.com"
194
+ # AND create_time <= 2017-01-15T01:30:15.01Z
195
+ # @param page_size [::Integer]
196
+ # The maximum number of items to return in a single page. By default 100 and
197
+ # at most 1000.
198
+ # @param page_token [::String]
199
+ # The next_page_token value returned from a previous list request.
200
+ #
201
+ # @yield [response, operation] Access the result along with the RPC operation
202
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Changelog>]
203
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
204
+ #
205
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Changelog>]
206
+ #
207
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
208
+ #
209
+ # @example Basic example
210
+ # require "google/cloud/dialogflow/cx/v3"
211
+ #
212
+ # # Create a client object. The client can be reused for multiple calls.
213
+ # client = Google::Cloud::Dialogflow::CX::V3::Changelogs::Client.new
214
+ #
215
+ # # Create a request. To set request fields, pass in keyword arguments.
216
+ # request = Google::Cloud::Dialogflow::CX::V3::ListChangelogsRequest.new
217
+ #
218
+ # # Call the list_changelogs method.
219
+ # result = client.list_changelogs request
220
+ #
221
+ # # The returned object is of type Gapic::PagedEnumerable. You can
222
+ # # iterate over all elements by calling #each, and the enumerable
223
+ # # will lazily make API calls to fetch subsequent pages. Other
224
+ # # methods are also available for managing paging directly.
225
+ # result.each do |response|
226
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Changelog.
227
+ # p response
228
+ # end
229
+ #
230
+ def list_changelogs request, options = nil
231
+ raise ::ArgumentError, "request must be provided" if request.nil?
232
+
233
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ListChangelogsRequest
234
+
235
+ # Converts hash and nil to an options object
236
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
237
+
238
+ # Customize the options with defaults
239
+ metadata = @config.rpcs.list_changelogs.metadata.to_h
240
+
241
+ # Set x-goog-api-client and x-goog-user-project headers
242
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
243
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
244
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
245
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
246
+
247
+ header_params = {}
248
+ if request.parent
249
+ header_params["parent"] = request.parent
250
+ end
251
+
252
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
253
+ metadata[:"x-goog-request-params"] ||= request_params_header
254
+
255
+ options.apply_defaults timeout: @config.rpcs.list_changelogs.timeout,
256
+ metadata: metadata,
257
+ retry_policy: @config.rpcs.list_changelogs.retry_policy
258
+
259
+ options.apply_defaults timeout: @config.timeout,
260
+ metadata: @config.metadata,
261
+ retry_policy: @config.retry_policy
262
+
263
+ @changelogs_stub.call_rpc :list_changelogs, request, options: options do |response, operation|
264
+ response = ::Gapic::PagedEnumerable.new @changelogs_stub, :list_changelogs, request, response, operation, options
265
+ yield response, operation if block_given?
266
+ return response
267
+ end
268
+ rescue ::GRPC::BadStatus => e
269
+ raise ::Google::Cloud::Error.from_error(e)
270
+ end
271
+
272
+ ##
273
+ # Retrieves the specified Changelog.
274
+ #
275
+ # @overload get_changelog(request, options = nil)
276
+ # Pass arguments to `get_changelog` via a request object, either of type
277
+ # {::Google::Cloud::Dialogflow::CX::V3::GetChangelogRequest} or an equivalent Hash.
278
+ #
279
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::GetChangelogRequest, ::Hash]
280
+ # A request object representing the call parameters. Required. To specify no
281
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
282
+ # @param options [::Gapic::CallOptions, ::Hash]
283
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
284
+ #
285
+ # @overload get_changelog(name: nil)
286
+ # Pass arguments to `get_changelog` via keyword arguments. Note that at
287
+ # least one keyword argument is required. To specify no parameters, or to keep all
288
+ # the default parameter values, pass an empty Hash as a request object (see above).
289
+ #
290
+ # @param name [::String]
291
+ # Required. The name of the changelog to get.
292
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
293
+ # ID>/changelogs/<Changelog ID>`.
294
+ #
295
+ # @yield [response, operation] Access the result along with the RPC operation
296
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Changelog]
297
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
298
+ #
299
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Changelog]
300
+ #
301
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
302
+ #
303
+ # @example Basic example
304
+ # require "google/cloud/dialogflow/cx/v3"
305
+ #
306
+ # # Create a client object. The client can be reused for multiple calls.
307
+ # client = Google::Cloud::Dialogflow::CX::V3::Changelogs::Client.new
308
+ #
309
+ # # Create a request. To set request fields, pass in keyword arguments.
310
+ # request = Google::Cloud::Dialogflow::CX::V3::GetChangelogRequest.new
311
+ #
312
+ # # Call the get_changelog method.
313
+ # result = client.get_changelog request
314
+ #
315
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Changelog.
316
+ # p result
317
+ #
318
+ def get_changelog request, options = nil
319
+ raise ::ArgumentError, "request must be provided" if request.nil?
320
+
321
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetChangelogRequest
322
+
323
+ # Converts hash and nil to an options object
324
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
325
+
326
+ # Customize the options with defaults
327
+ metadata = @config.rpcs.get_changelog.metadata.to_h
328
+
329
+ # Set x-goog-api-client and x-goog-user-project headers
330
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
331
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
332
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
333
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
334
+
335
+ header_params = {}
336
+ if request.name
337
+ header_params["name"] = request.name
338
+ end
339
+
340
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
341
+ metadata[:"x-goog-request-params"] ||= request_params_header
342
+
343
+ options.apply_defaults timeout: @config.rpcs.get_changelog.timeout,
344
+ metadata: metadata,
345
+ retry_policy: @config.rpcs.get_changelog.retry_policy
346
+
347
+ options.apply_defaults timeout: @config.timeout,
348
+ metadata: @config.metadata,
349
+ retry_policy: @config.retry_policy
350
+
351
+ @changelogs_stub.call_rpc :get_changelog, request, options: options do |response, operation|
352
+ yield response, operation if block_given?
353
+ return response
354
+ end
355
+ rescue ::GRPC::BadStatus => e
356
+ raise ::Google::Cloud::Error.from_error(e)
357
+ end
358
+
359
+ ##
360
+ # Configuration class for the Changelogs API.
361
+ #
362
+ # This class represents the configuration for Changelogs,
363
+ # providing control over timeouts, retry behavior, logging, transport
364
+ # parameters, and other low-level controls. Certain parameters can also be
365
+ # applied individually to specific RPCs. See
366
+ # {::Google::Cloud::Dialogflow::CX::V3::Changelogs::Client::Configuration::Rpcs}
367
+ # for a list of RPCs that can be configured independently.
368
+ #
369
+ # Configuration can be applied globally to all clients, or to a single client
370
+ # on construction.
371
+ #
372
+ # @example
373
+ #
374
+ # # Modify the global config, setting the timeout for
375
+ # # list_changelogs to 20 seconds,
376
+ # # and all remaining timeouts to 10 seconds.
377
+ # ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Client.configure do |config|
378
+ # config.timeout = 10.0
379
+ # config.rpcs.list_changelogs.timeout = 20.0
380
+ # end
381
+ #
382
+ # # Apply the above configuration only to a new client.
383
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Client.new do |config|
384
+ # config.timeout = 10.0
385
+ # config.rpcs.list_changelogs.timeout = 20.0
386
+ # end
387
+ #
388
+ # @!attribute [rw] endpoint
389
+ # The hostname or hostname:port of the service endpoint.
390
+ # Defaults to `"dialogflow.googleapis.com"`.
391
+ # @return [::String]
392
+ # @!attribute [rw] credentials
393
+ # Credentials to send with calls. You may provide any of the following types:
394
+ # * (`String`) The path to a service account key file in JSON format
395
+ # * (`Hash`) A service account key as a Hash
396
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
397
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
398
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
399
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
400
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
401
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
402
+ # * (`nil`) indicating no credentials
403
+ # @return [::Object]
404
+ # @!attribute [rw] scope
405
+ # The OAuth scopes
406
+ # @return [::Array<::String>]
407
+ # @!attribute [rw] lib_name
408
+ # The library name as recorded in instrumentation and logging
409
+ # @return [::String]
410
+ # @!attribute [rw] lib_version
411
+ # The library version as recorded in instrumentation and logging
412
+ # @return [::String]
413
+ # @!attribute [rw] channel_args
414
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
415
+ # `GRPC::Core::Channel` object is provided as the credential.
416
+ # @return [::Hash]
417
+ # @!attribute [rw] interceptors
418
+ # An array of interceptors that are run before calls are executed.
419
+ # @return [::Array<::GRPC::ClientInterceptor>]
420
+ # @!attribute [rw] timeout
421
+ # The call timeout in seconds.
422
+ # @return [::Numeric]
423
+ # @!attribute [rw] metadata
424
+ # Additional gRPC headers to be sent with the call.
425
+ # @return [::Hash{::Symbol=>::String}]
426
+ # @!attribute [rw] retry_policy
427
+ # The retry policy. The value is a hash with the following keys:
428
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
429
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
430
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
431
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
432
+ # trigger a retry.
433
+ # @return [::Hash]
434
+ # @!attribute [rw] quota_project
435
+ # A separate project against which to charge quota.
436
+ # @return [::String]
437
+ #
438
+ class Configuration
439
+ extend ::Gapic::Config
440
+
441
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
442
+ config_attr :credentials, nil do |value|
443
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
444
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
445
+ allowed.any? { |klass| klass === value }
446
+ end
447
+ config_attr :scope, nil, ::String, ::Array, nil
448
+ config_attr :lib_name, nil, ::String, nil
449
+ config_attr :lib_version, nil, ::String, nil
450
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
451
+ config_attr :interceptors, nil, ::Array, nil
452
+ config_attr :timeout, nil, ::Numeric, nil
453
+ config_attr :metadata, nil, ::Hash, nil
454
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
455
+ config_attr :quota_project, nil, ::String, nil
456
+
457
+ # @private
458
+ def initialize parent_config = nil
459
+ @parent_config = parent_config unless parent_config.nil?
460
+
461
+ yield self if block_given?
462
+ end
463
+
464
+ ##
465
+ # Configurations for individual RPCs
466
+ # @return [Rpcs]
467
+ #
468
+ def rpcs
469
+ @rpcs ||= begin
470
+ parent_rpcs = nil
471
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
472
+ Rpcs.new parent_rpcs
473
+ end
474
+ end
475
+
476
+ ##
477
+ # Configuration RPC class for the Changelogs API.
478
+ #
479
+ # Includes fields providing the configuration for each RPC in this service.
480
+ # Each configuration object is of type `Gapic::Config::Method` and includes
481
+ # the following configuration fields:
482
+ #
483
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
484
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
485
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
486
+ # include the following keys:
487
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
488
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
489
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
490
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
491
+ # trigger a retry.
492
+ #
493
+ class Rpcs
494
+ ##
495
+ # RPC-specific configuration for `list_changelogs`
496
+ # @return [::Gapic::Config::Method]
497
+ #
498
+ attr_reader :list_changelogs
499
+ ##
500
+ # RPC-specific configuration for `get_changelog`
501
+ # @return [::Gapic::Config::Method]
502
+ #
503
+ attr_reader :get_changelog
504
+
505
+ # @private
506
+ def initialize parent_rpcs = nil
507
+ list_changelogs_config = parent_rpcs.list_changelogs if parent_rpcs.respond_to? :list_changelogs
508
+ @list_changelogs = ::Gapic::Config::Method.new list_changelogs_config
509
+ get_changelog_config = parent_rpcs.get_changelog if parent_rpcs.respond_to? :get_changelog
510
+ @get_changelog = ::Gapic::Config::Method.new get_changelog_config
511
+
512
+ yield self if block_given?
513
+ end
514
+ end
515
+ end
516
+ end
517
+ end
518
+ end
519
+ end
520
+ end
521
+ end
522
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Dialogflow
24
+ module CX
25
+ module V3
26
+ module Changelogs
27
+ # Credentials for the Changelogs API.
28
+ class Credentials < ::Google::Auth::Credentials
29
+ self.scope = [
30
+ "https://www.googleapis.com/auth/cloud-platform",
31
+ "https://www.googleapis.com/auth/dialogflow"
32
+ ]
33
+ self.env_vars = [
34
+ "DIALOGFLOW_CREDENTIALS",
35
+ "DIALOGFLOW_KEYFILE",
36
+ "GOOGLE_CLOUD_CREDENTIALS",
37
+ "GOOGLE_CLOUD_KEYFILE",
38
+ "GCLOUD_KEYFILE",
39
+ "DIALOGFLOW_CREDENTIALS_JSON",
40
+ "DIALOGFLOW_KEYFILE_JSON",
41
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
42
+ "GOOGLE_CLOUD_KEYFILE_JSON",
43
+ "GCLOUD_KEYFILE_JSON"
44
+ ]
45
+ self.paths = [
46
+ "~/.config/google_cloud/application_default_credentials.json"
47
+ ]
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end