google-cloud-dialogflow-cx-v3 0.14.0 → 0.15.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +2 -2
  4. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +2 -2
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +1032 -0
  6. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +815 -0
  7. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/service_stub.rb +586 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/agents/rest.rb +56 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/agents.rb +6 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/bindings_override.rb +104 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +2 -2
  12. data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +472 -0
  13. data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/service_stub.rb +168 -0
  14. data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest.rb +55 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +6 -0
  16. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +2 -2
  17. data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +456 -0
  18. data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/service_stub.rb +168 -0
  19. data/lib/google/cloud/dialogflow/cx/v3/deployments/rest.rb +55 -0
  20. data/lib/google/cloud/dialogflow/cx/v3/deployments.rb +6 -0
  21. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +2 -2
  22. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +740 -0
  23. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/service_stub.rb +347 -0
  24. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest.rb +55 -0
  25. data/lib/google/cloud/dialogflow/cx/v3/entity_types.rb +6 -0
  26. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +2 -2
  27. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +2 -2
  28. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +1028 -0
  29. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +815 -0
  30. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/service_stub.rb +585 -0
  31. data/lib/google/cloud/dialogflow/cx/v3/environments/rest.rb +57 -0
  32. data/lib/google/cloud/dialogflow/cx/v3/environments.rb +6 -0
  33. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +2 -2
  34. data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +821 -0
  35. data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/service_stub.rb +467 -0
  36. data/lib/google/cloud/dialogflow/cx/v3/experiments/rest.rb +55 -0
  37. data/lib/google/cloud/dialogflow/cx/v3/experiments.rb +6 -0
  38. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +2 -2
  39. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +2 -2
  40. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +1182 -0
  41. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +815 -0
  42. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/service_stub.rb +646 -0
  43. data/lib/google/cloud/dialogflow/cx/v3/flows/rest.rb +56 -0
  44. data/lib/google/cloud/dialogflow/cx/v3/flows.rb +6 -0
  45. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +2 -2
  46. data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +722 -0
  47. data/lib/google/cloud/dialogflow/cx/v3/intents/rest/service_stub.rb +347 -0
  48. data/lib/google/cloud/dialogflow/cx/v3/intents/rest.rb +55 -0
  49. data/lib/google/cloud/dialogflow/cx/v3/intents.rb +6 -0
  50. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +2 -2
  51. data/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +777 -0
  52. data/lib/google/cloud/dialogflow/cx/v3/pages/rest/service_stub.rb +347 -0
  53. data/lib/google/cloud/dialogflow/cx/v3/pages/rest.rb +55 -0
  54. data/lib/google/cloud/dialogflow/cx/v3/pages.rb +6 -0
  55. data/lib/google/cloud/dialogflow/cx/v3/rest.rb +55 -0
  56. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +2 -2
  57. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +673 -0
  58. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/service_stub.rb +347 -0
  59. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest.rb +55 -0
  60. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service.rb +6 -0
  61. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +2 -2
  62. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +688 -0
  63. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/service_stub.rb +384 -0
  64. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest.rb +56 -0
  65. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types.rb +6 -0
  66. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +2 -2
  67. data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +576 -0
  68. data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/service_stub.rb +254 -0
  69. data/lib/google/cloud/dialogflow/cx/v3/sessions/rest.rb +58 -0
  70. data/lib/google/cloud/dialogflow/cx/v3/sessions.rb +6 -0
  71. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +2 -2
  72. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +2 -2
  73. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +1304 -0
  74. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +815 -0
  75. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/service_stub.rb +765 -0
  76. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest.rb +57 -0
  77. data/lib/google/cloud/dialogflow/cx/v3/test_cases.rb +6 -0
  78. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +2 -2
  79. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +748 -0
  80. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/service_stub.rb +347 -0
  81. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest.rb +56 -0
  82. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups.rb +6 -0
  83. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  84. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +2 -2
  85. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +2 -2
  86. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +865 -0
  87. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +815 -0
  88. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/service_stub.rb +467 -0
  89. data/lib/google/cloud/dialogflow/cx/v3/versions/rest.rb +56 -0
  90. data/lib/google/cloud/dialogflow/cx/v3/versions.rb +6 -0
  91. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +2 -2
  92. data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +677 -0
  93. data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/service_stub.rb +347 -0
  94. data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest.rb +55 -0
  95. data/lib/google/cloud/dialogflow/cx/v3/webhooks.rb +6 -0
  96. data/lib/google/cloud/dialogflow/cx/v3.rb +5 -0
  97. data/proto_docs/google/cloud/dialogflow/cx/v3/deployment.rb +1 -1
  98. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +1 -1
  99. metadata +57 -2
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 "gapic/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Dialogflow
24
+ module CX
25
+ ##
26
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
27
+ #
28
+ # require "google/cloud/dialogflow/cx/v3/rest"
29
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Pages::Rest::Client.new
30
+ #
31
+ module V3
32
+ ##
33
+ # @private
34
+ # Initialize the mixin bindings configuration
35
+ #
36
+ def self.configure
37
+ @configure ||= begin
38
+ namespace = ["Google", "Cloud", "Dialogflow", "CX"]
39
+ parent_config = while namespace.any?
40
+ parent_name = namespace.join "::"
41
+ parent_const = const_get parent_name
42
+ break parent_const.configure if parent_const.respond_to? :configure
43
+ namespace.pop
44
+ end
45
+
46
+ default_config = Configuration.new parent_config
47
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
48
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
49
+ uri_method: :get,
50
+ uri_template: "/v3/{name}",
51
+ matches: [
52
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
53
+ ],
54
+ body: nil
55
+ )
56
+ ]
57
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
58
+
59
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
60
+ uri_method: :get,
61
+ uri_template: "/v3/{name}/locations",
62
+ matches: [
63
+ ["name", %r{^projects/[^/]+/?$}, false]
64
+ ],
65
+ body: nil
66
+ )
67
+ ]
68
+ default_config
69
+ end
70
+ yield @configure if block_given?
71
+ @configure
72
+ end
73
+
74
+ ##
75
+ # @private
76
+ # Configuration class for the google.cloud.dialogflow.cx.v3 package.
77
+ #
78
+ # This class contains common configuration for all services
79
+ # of the google.cloud.dialogflow.cx.v3 package.
80
+ #
81
+ # This configuration is for internal use of the client library classes,
82
+ # and it is not intended that the end-users will read or change it.
83
+ #
84
+ class Configuration
85
+ extend ::Gapic::Config
86
+
87
+ # @private
88
+ # Overrides for http bindings for the RPC of the mixins for this package.
89
+ # Services in this package should use these when creating clients for the mixin services.
90
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
91
+ config_attr :bindings_override, {}, ::Hash, nil
92
+
93
+ # @private
94
+ def initialize parent_config = nil
95
+ @parent_config = parent_config unless parent_config.nil?
96
+
97
+ yield self if block_given?
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -406,9 +406,9 @@ module Google
406
406
  # * (`String`) The path to a service account key file in JSON format
407
407
  # * (`Hash`) A service account key as a Hash
408
408
  # * (`Google::Auth::Credentials`) A googleauth credentials object
409
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
409
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
410
410
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
411
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
411
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
412
412
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
413
413
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
414
414
  # * (`nil`) indicating no credentials
@@ -0,0 +1,472 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "google/cloud/dialogflow/cx/v3/changelogs/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Dialogflow
27
+ module CX
28
+ module V3
29
+ module Changelogs
30
+ module Rest
31
+ ##
32
+ # REST client for the Changelogs service.
33
+ #
34
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Changelog Changelogs}.
35
+ #
36
+ class Client
37
+ include Paths
38
+
39
+ # @private
40
+ attr_reader :changelogs_stub
41
+
42
+ ##
43
+ # Configure the Changelogs Client class.
44
+ #
45
+ # See {::Google::Cloud::Dialogflow::CX::V3::Changelogs::Rest::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # @example
49
+ #
50
+ # # Modify the configuration for all Changelogs clients
51
+ # ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Rest::Client.configure do |config|
52
+ # config.timeout = 10.0
53
+ # end
54
+ #
55
+ # @yield [config] Configure the Client client.
56
+ # @yieldparam config [Client::Configuration]
57
+ #
58
+ # @return [Client::Configuration]
59
+ #
60
+ def self.configure
61
+ @configure ||= begin
62
+ namespace = ["Google", "Cloud", "Dialogflow", "CX", "V3"]
63
+ parent_config = while namespace.any?
64
+ parent_name = namespace.join "::"
65
+ parent_const = const_get parent_name
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
+ namespace.pop
68
+ end
69
+ default_config = Client::Configuration.new parent_config
70
+
71
+ default_config.timeout = 60.0
72
+ default_config.retry_policy = {
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
74
+ }
75
+
76
+ default_config
77
+ end
78
+ yield @configure if block_given?
79
+ @configure
80
+ end
81
+
82
+ ##
83
+ # Configure the Changelogs Client instance.
84
+ #
85
+ # The configuration is set to the derived mode, meaning that values can be changed,
86
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
87
+ # should be made on {Client.configure}.
88
+ #
89
+ # See {::Google::Cloud::Dialogflow::CX::V3::Changelogs::Rest::Client::Configuration}
90
+ # for a description of the configuration fields.
91
+ #
92
+ # @yield [config] Configure the Client client.
93
+ # @yieldparam config [Client::Configuration]
94
+ #
95
+ # @return [Client::Configuration]
96
+ #
97
+ def configure
98
+ yield @config if block_given?
99
+ @config
100
+ end
101
+
102
+ ##
103
+ # Create a new Changelogs REST client object.
104
+ #
105
+ # @example
106
+ #
107
+ # # Create a client using the default configuration
108
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Rest::Client.new
109
+ #
110
+ # # Create a client using a custom configuration
111
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Rest::Client.new do |config|
112
+ # config.timeout = 10.0
113
+ # end
114
+ #
115
+ # @yield [config] Configure the Changelogs client.
116
+ # @yieldparam config [Client::Configuration]
117
+ #
118
+ def initialize
119
+ # Create the configuration object
120
+ @config = Configuration.new Client.configure
121
+
122
+ # Yield the configuration if needed
123
+ yield @config if block_given?
124
+
125
+ # Create credentials
126
+ credentials = @config.credentials
127
+ # Use self-signed JWT if the endpoint is unchanged from default,
128
+ # but only if the default endpoint does not have a region prefix.
129
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
130
+ !@config.endpoint.split(".").first.include?("-")
131
+ credentials ||= Credentials.default scope: @config.scope,
132
+ enable_self_signed_jwt: enable_self_signed_jwt
133
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
134
+ credentials = Credentials.new credentials, scope: @config.scope
135
+ end
136
+
137
+ @quota_project_id = @config.quota_project
138
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
139
+
140
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
141
+ config.credentials = credentials
142
+ config.quota_project = @quota_project_id
143
+ config.endpoint = @config.endpoint
144
+ config.bindings_override = @config.bindings_override
145
+ end
146
+
147
+ @changelogs_stub = ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
148
+ end
149
+
150
+ ##
151
+ # Get the associated client for mix-in of the Locations.
152
+ #
153
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
154
+ #
155
+ attr_reader :location_client
156
+
157
+ # Service calls
158
+
159
+ ##
160
+ # Returns the list of Changelogs.
161
+ #
162
+ # @overload list_changelogs(request, options = nil)
163
+ # Pass arguments to `list_changelogs` via a request object, either of type
164
+ # {::Google::Cloud::Dialogflow::CX::V3::ListChangelogsRequest} or an equivalent Hash.
165
+ #
166
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ListChangelogsRequest, ::Hash]
167
+ # A request object representing the call parameters. Required. To specify no
168
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
169
+ # @param options [::Gapic::CallOptions, ::Hash]
170
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
171
+ #
172
+ # @overload list_changelogs(parent: nil, filter: nil, page_size: nil, page_token: nil)
173
+ # Pass arguments to `list_changelogs` via keyword arguments. Note that at
174
+ # least one keyword argument is required. To specify no parameters, or to keep all
175
+ # the default parameter values, pass an empty Hash as a request object (see above).
176
+ #
177
+ # @param parent [::String]
178
+ # Required. The agent containing the changelogs.
179
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
180
+ # @param filter [::String]
181
+ # The filter string. Supports filter by user_email, resource, type and
182
+ # create_time. Some examples:
183
+ # 1. By user email:
184
+ # user_email = "someone@google.com"
185
+ # 2. By resource name:
186
+ # resource = "projects/123/locations/global/agents/456/flows/789"
187
+ # 3. By resource display name:
188
+ # display_name = "my agent"
189
+ # 4. By action:
190
+ # action = "Create"
191
+ # 5. By type:
192
+ # type = "flows"
193
+ # 6. By create time. Currently predicates on `create_time` and
194
+ # `create_time_epoch_seconds` are supported:
195
+ # create_time_epoch_seconds > 1551790877 AND create_time <=
196
+ # 2017-01-15T01:30:15.01Z
197
+ # 7. Combination of above filters:
198
+ # resource = "projects/123/locations/global/agents/456/flows/789"
199
+ # AND user_email = "someone@google.com"
200
+ # AND create_time <= 2017-01-15T01:30:15.01Z
201
+ # @param page_size [::Integer]
202
+ # The maximum number of items to return in a single page. By default 100 and
203
+ # at most 1000.
204
+ # @param page_token [::String]
205
+ # The next_page_token value returned from a previous list request.
206
+ # @yield [result, operation] Access the result along with the TransportOperation object
207
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Changelog>]
208
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
209
+ #
210
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Changelog>]
211
+ #
212
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
213
+ def list_changelogs request, options = nil
214
+ raise ::ArgumentError, "request must be provided" if request.nil?
215
+
216
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ListChangelogsRequest
217
+
218
+ # Converts hash and nil to an options object
219
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
220
+
221
+ # Customize the options with defaults
222
+ call_metadata = @config.rpcs.list_changelogs.metadata.to_h
223
+
224
+ # Set x-goog-api-client and x-goog-user-project headers
225
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
226
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
227
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
228
+ transports_version_send: [:rest]
229
+
230
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
231
+
232
+ options.apply_defaults timeout: @config.rpcs.list_changelogs.timeout,
233
+ metadata: call_metadata,
234
+ retry_policy: @config.rpcs.list_changelogs.retry_policy
235
+
236
+ options.apply_defaults timeout: @config.timeout,
237
+ metadata: @config.metadata,
238
+ retry_policy: @config.retry_policy
239
+
240
+ @changelogs_stub.list_changelogs request, options do |result, operation|
241
+ result = ::Gapic::Rest::PagedEnumerable.new @changelogs_stub, :list_changelogs, "changelogs", request, result, options
242
+ yield result, operation if block_given?
243
+ return result
244
+ end
245
+ rescue ::Gapic::Rest::Error => e
246
+ raise ::Google::Cloud::Error.from_error(e)
247
+ end
248
+
249
+ ##
250
+ # Retrieves the specified Changelog.
251
+ #
252
+ # @overload get_changelog(request, options = nil)
253
+ # Pass arguments to `get_changelog` via a request object, either of type
254
+ # {::Google::Cloud::Dialogflow::CX::V3::GetChangelogRequest} or an equivalent Hash.
255
+ #
256
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::GetChangelogRequest, ::Hash]
257
+ # A request object representing the call parameters. Required. To specify no
258
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
259
+ # @param options [::Gapic::CallOptions, ::Hash]
260
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
261
+ #
262
+ # @overload get_changelog(name: nil)
263
+ # Pass arguments to `get_changelog` via keyword arguments. Note that at
264
+ # least one keyword argument is required. To specify no parameters, or to keep all
265
+ # the default parameter values, pass an empty Hash as a request object (see above).
266
+ #
267
+ # @param name [::String]
268
+ # Required. The name of the changelog to get.
269
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
270
+ # ID>/changelogs/<Changelog ID>`.
271
+ # @yield [result, operation] Access the result along with the TransportOperation object
272
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::Changelog]
273
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
274
+ #
275
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Changelog]
276
+ #
277
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
278
+ def get_changelog request, options = nil
279
+ raise ::ArgumentError, "request must be provided" if request.nil?
280
+
281
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetChangelogRequest
282
+
283
+ # Converts hash and nil to an options object
284
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
285
+
286
+ # Customize the options with defaults
287
+ call_metadata = @config.rpcs.get_changelog.metadata.to_h
288
+
289
+ # Set x-goog-api-client and x-goog-user-project headers
290
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
291
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
292
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
293
+ transports_version_send: [:rest]
294
+
295
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
296
+
297
+ options.apply_defaults timeout: @config.rpcs.get_changelog.timeout,
298
+ metadata: call_metadata,
299
+ retry_policy: @config.rpcs.get_changelog.retry_policy
300
+
301
+ options.apply_defaults timeout: @config.timeout,
302
+ metadata: @config.metadata,
303
+ retry_policy: @config.retry_policy
304
+
305
+ @changelogs_stub.get_changelog request, options do |result, operation|
306
+ yield result, operation if block_given?
307
+ return result
308
+ end
309
+ rescue ::Gapic::Rest::Error => e
310
+ raise ::Google::Cloud::Error.from_error(e)
311
+ end
312
+
313
+ ##
314
+ # Configuration class for the Changelogs REST API.
315
+ #
316
+ # This class represents the configuration for Changelogs REST,
317
+ # providing control over timeouts, retry behavior, logging, transport
318
+ # parameters, and other low-level controls. Certain parameters can also be
319
+ # applied individually to specific RPCs. See
320
+ # {::Google::Cloud::Dialogflow::CX::V3::Changelogs::Rest::Client::Configuration::Rpcs}
321
+ # for a list of RPCs that can be configured independently.
322
+ #
323
+ # Configuration can be applied globally to all clients, or to a single client
324
+ # on construction.
325
+ #
326
+ # @example
327
+ #
328
+ # # Modify the global config, setting the timeout for
329
+ # # list_changelogs to 20 seconds,
330
+ # # and all remaining timeouts to 10 seconds.
331
+ # ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Rest::Client.configure do |config|
332
+ # config.timeout = 10.0
333
+ # config.rpcs.list_changelogs.timeout = 20.0
334
+ # end
335
+ #
336
+ # # Apply the above configuration only to a new client.
337
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Rest::Client.new do |config|
338
+ # config.timeout = 10.0
339
+ # config.rpcs.list_changelogs.timeout = 20.0
340
+ # end
341
+ #
342
+ # @!attribute [rw] endpoint
343
+ # The hostname or hostname:port of the service endpoint.
344
+ # Defaults to `"dialogflow.googleapis.com"`.
345
+ # @return [::String]
346
+ # @!attribute [rw] credentials
347
+ # Credentials to send with calls. You may provide any of the following types:
348
+ # * (`String`) The path to a service account key file in JSON format
349
+ # * (`Hash`) A service account key as a Hash
350
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
351
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
352
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
353
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
354
+ # * (`nil`) indicating no credentials
355
+ # @return [::Object]
356
+ # @!attribute [rw] scope
357
+ # The OAuth scopes
358
+ # @return [::Array<::String>]
359
+ # @!attribute [rw] lib_name
360
+ # The library name as recorded in instrumentation and logging
361
+ # @return [::String]
362
+ # @!attribute [rw] lib_version
363
+ # The library version as recorded in instrumentation and logging
364
+ # @return [::String]
365
+ # @!attribute [rw] timeout
366
+ # The call timeout in seconds.
367
+ # @return [::Numeric]
368
+ # @!attribute [rw] metadata
369
+ # Additional headers to be sent with the call.
370
+ # @return [::Hash{::Symbol=>::String}]
371
+ # @!attribute [rw] retry_policy
372
+ # The retry policy. The value is a hash with the following keys:
373
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
374
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
375
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
376
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
377
+ # trigger a retry.
378
+ # @return [::Hash]
379
+ # @!attribute [rw] quota_project
380
+ # A separate project against which to charge quota.
381
+ # @return [::String]
382
+ #
383
+ class Configuration
384
+ extend ::Gapic::Config
385
+
386
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
387
+ config_attr :credentials, nil do |value|
388
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
389
+ allowed.any? { |klass| klass === value }
390
+ end
391
+ config_attr :scope, nil, ::String, ::Array, nil
392
+ config_attr :lib_name, nil, ::String, nil
393
+ config_attr :lib_version, nil, ::String, nil
394
+ config_attr :timeout, nil, ::Numeric, nil
395
+ config_attr :metadata, nil, ::Hash, nil
396
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
397
+ config_attr :quota_project, nil, ::String, nil
398
+
399
+ # @private
400
+ # Overrides for http bindings for the RPCs of this service
401
+ # are only used when this service is used as mixin, and only
402
+ # by the host service.
403
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
404
+ config_attr :bindings_override, {}, ::Hash, nil
405
+
406
+ # @private
407
+ def initialize parent_config = nil
408
+ @parent_config = parent_config unless parent_config.nil?
409
+
410
+ yield self if block_given?
411
+ end
412
+
413
+ ##
414
+ # Configurations for individual RPCs
415
+ # @return [Rpcs]
416
+ #
417
+ def rpcs
418
+ @rpcs ||= begin
419
+ parent_rpcs = nil
420
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
421
+ Rpcs.new parent_rpcs
422
+ end
423
+ end
424
+
425
+ ##
426
+ # Configuration RPC class for the Changelogs API.
427
+ #
428
+ # Includes fields providing the configuration for each RPC in this service.
429
+ # Each configuration object is of type `Gapic::Config::Method` and includes
430
+ # the following configuration fields:
431
+ #
432
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
433
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
434
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
435
+ # include the following keys:
436
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
437
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
438
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
439
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
440
+ # trigger a retry.
441
+ #
442
+ class Rpcs
443
+ ##
444
+ # RPC-specific configuration for `list_changelogs`
445
+ # @return [::Gapic::Config::Method]
446
+ #
447
+ attr_reader :list_changelogs
448
+ ##
449
+ # RPC-specific configuration for `get_changelog`
450
+ # @return [::Gapic::Config::Method]
451
+ #
452
+ attr_reader :get_changelog
453
+
454
+ # @private
455
+ def initialize parent_rpcs = nil
456
+ list_changelogs_config = parent_rpcs.list_changelogs if parent_rpcs.respond_to? :list_changelogs
457
+ @list_changelogs = ::Gapic::Config::Method.new list_changelogs_config
458
+ get_changelog_config = parent_rpcs.get_changelog if parent_rpcs.respond_to? :get_changelog
459
+ @get_changelog = ::Gapic::Config::Method.new get_changelog_config
460
+
461
+ yield self if block_given?
462
+ end
463
+ end
464
+ end
465
+ end
466
+ end
467
+ end
468
+ end
469
+ end
470
+ end
471
+ end
472
+ end