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,673 @@
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/security_settings_pb"
21
+ require "google/cloud/dialogflow/cx/v3/security_settings_service/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 SecuritySettingsService
30
+ module Rest
31
+ ##
32
+ # REST client for the SecuritySettingsService service.
33
+ #
34
+ # Service for managing security settings for Dialogflow.
35
+ #
36
+ class Client
37
+ include Paths
38
+
39
+ # @private
40
+ attr_reader :security_settings_service_stub
41
+
42
+ ##
43
+ # Configure the SecuritySettingsService Client class.
44
+ #
45
+ # See {::Google::Cloud::Dialogflow::CX::V3::SecuritySettingsService::Rest::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # @example
49
+ #
50
+ # # Modify the configuration for all SecuritySettingsService clients
51
+ # ::Google::Cloud::Dialogflow::CX::V3::SecuritySettingsService::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 SecuritySettingsService 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::SecuritySettingsService::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 SecuritySettingsService REST client object.
104
+ #
105
+ # @example
106
+ #
107
+ # # Create a client using the default configuration
108
+ # client = ::Google::Cloud::Dialogflow::CX::V3::SecuritySettingsService::Rest::Client.new
109
+ #
110
+ # # Create a client using a custom configuration
111
+ # client = ::Google::Cloud::Dialogflow::CX::V3::SecuritySettingsService::Rest::Client.new do |config|
112
+ # config.timeout = 10.0
113
+ # end
114
+ #
115
+ # @yield [config] Configure the SecuritySettingsService 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
+ @security_settings_service_stub = ::Google::Cloud::Dialogflow::CX::V3::SecuritySettingsService::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
+ # Create security settings in the specified location.
161
+ #
162
+ # @overload create_security_settings(request, options = nil)
163
+ # Pass arguments to `create_security_settings` via a request object, either of type
164
+ # {::Google::Cloud::Dialogflow::CX::V3::CreateSecuritySettingsRequest} or an equivalent Hash.
165
+ #
166
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::CreateSecuritySettingsRequest, ::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 create_security_settings(parent: nil, security_settings: nil)
173
+ # Pass arguments to `create_security_settings` 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 location to create an
179
+ # {::Google::Cloud::Dialogflow::CX::V3::SecuritySettings SecuritySettings} for.
180
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
181
+ # @param security_settings [::Google::Cloud::Dialogflow::CX::V3::SecuritySettings, ::Hash]
182
+ # Required. The security settings to create.
183
+ # @yield [result, operation] Access the result along with the TransportOperation object
184
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::SecuritySettings]
185
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
186
+ #
187
+ # @return [::Google::Cloud::Dialogflow::CX::V3::SecuritySettings]
188
+ #
189
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
190
+ def create_security_settings request, options = nil
191
+ raise ::ArgumentError, "request must be provided" if request.nil?
192
+
193
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::CreateSecuritySettingsRequest
194
+
195
+ # Converts hash and nil to an options object
196
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
197
+
198
+ # Customize the options with defaults
199
+ call_metadata = @config.rpcs.create_security_settings.metadata.to_h
200
+
201
+ # Set x-goog-api-client and x-goog-user-project headers
202
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
203
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
204
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
205
+ transports_version_send: [:rest]
206
+
207
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
208
+
209
+ options.apply_defaults timeout: @config.rpcs.create_security_settings.timeout,
210
+ metadata: call_metadata,
211
+ retry_policy: @config.rpcs.create_security_settings.retry_policy
212
+
213
+ options.apply_defaults timeout: @config.timeout,
214
+ metadata: @config.metadata,
215
+ retry_policy: @config.retry_policy
216
+
217
+ @security_settings_service_stub.create_security_settings request, options do |result, operation|
218
+ yield result, operation if block_given?
219
+ return result
220
+ end
221
+ rescue ::Gapic::Rest::Error => e
222
+ raise ::Google::Cloud::Error.from_error(e)
223
+ end
224
+
225
+ ##
226
+ # Retrieves the specified
227
+ # {::Google::Cloud::Dialogflow::CX::V3::SecuritySettings SecuritySettings}. The
228
+ # returned settings may be stale by up to 1 minute.
229
+ #
230
+ # @overload get_security_settings(request, options = nil)
231
+ # Pass arguments to `get_security_settings` via a request object, either of type
232
+ # {::Google::Cloud::Dialogflow::CX::V3::GetSecuritySettingsRequest} or an equivalent Hash.
233
+ #
234
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::GetSecuritySettingsRequest, ::Hash]
235
+ # A request object representing the call parameters. Required. To specify no
236
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
237
+ # @param options [::Gapic::CallOptions, ::Hash]
238
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
239
+ #
240
+ # @overload get_security_settings(name: nil)
241
+ # Pass arguments to `get_security_settings` via keyword arguments. Note that at
242
+ # least one keyword argument is required. To specify no parameters, or to keep all
243
+ # the default parameter values, pass an empty Hash as a request object (see above).
244
+ #
245
+ # @param name [::String]
246
+ # Required. Resource name of the settings.
247
+ # Format: `projects/<Project ID>/locations/<Location
248
+ # ID>/securitySettings/<security settings ID>`.
249
+ # @yield [result, operation] Access the result along with the TransportOperation object
250
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::SecuritySettings]
251
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
252
+ #
253
+ # @return [::Google::Cloud::Dialogflow::CX::V3::SecuritySettings]
254
+ #
255
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
256
+ def get_security_settings request, options = nil
257
+ raise ::ArgumentError, "request must be provided" if request.nil?
258
+
259
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetSecuritySettingsRequest
260
+
261
+ # Converts hash and nil to an options object
262
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
263
+
264
+ # Customize the options with defaults
265
+ call_metadata = @config.rpcs.get_security_settings.metadata.to_h
266
+
267
+ # Set x-goog-api-client and x-goog-user-project headers
268
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
270
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
271
+ transports_version_send: [:rest]
272
+
273
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
+
275
+ options.apply_defaults timeout: @config.rpcs.get_security_settings.timeout,
276
+ metadata: call_metadata,
277
+ retry_policy: @config.rpcs.get_security_settings.retry_policy
278
+
279
+ options.apply_defaults timeout: @config.timeout,
280
+ metadata: @config.metadata,
281
+ retry_policy: @config.retry_policy
282
+
283
+ @security_settings_service_stub.get_security_settings request, options do |result, operation|
284
+ yield result, operation if block_given?
285
+ return result
286
+ end
287
+ rescue ::Gapic::Rest::Error => e
288
+ raise ::Google::Cloud::Error.from_error(e)
289
+ end
290
+
291
+ ##
292
+ # Updates the specified
293
+ # {::Google::Cloud::Dialogflow::CX::V3::SecuritySettings SecuritySettings}.
294
+ #
295
+ # @overload update_security_settings(request, options = nil)
296
+ # Pass arguments to `update_security_settings` via a request object, either of type
297
+ # {::Google::Cloud::Dialogflow::CX::V3::UpdateSecuritySettingsRequest} or an equivalent Hash.
298
+ #
299
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::UpdateSecuritySettingsRequest, ::Hash]
300
+ # A request object representing the call parameters. Required. To specify no
301
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
302
+ # @param options [::Gapic::CallOptions, ::Hash]
303
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
304
+ #
305
+ # @overload update_security_settings(security_settings: nil, update_mask: nil)
306
+ # Pass arguments to `update_security_settings` via keyword arguments. Note that at
307
+ # least one keyword argument is required. To specify no parameters, or to keep all
308
+ # the default parameter values, pass an empty Hash as a request object (see above).
309
+ #
310
+ # @param security_settings [::Google::Cloud::Dialogflow::CX::V3::SecuritySettings, ::Hash]
311
+ # Required. [SecuritySettings] object that contains values for each of the
312
+ # fields to update.
313
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
314
+ # Required. The mask to control which fields get updated. If the mask is not
315
+ # present, all fields will be updated.
316
+ # @yield [result, operation] Access the result along with the TransportOperation object
317
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::SecuritySettings]
318
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
319
+ #
320
+ # @return [::Google::Cloud::Dialogflow::CX::V3::SecuritySettings]
321
+ #
322
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
323
+ def update_security_settings request, options = nil
324
+ raise ::ArgumentError, "request must be provided" if request.nil?
325
+
326
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::UpdateSecuritySettingsRequest
327
+
328
+ # Converts hash and nil to an options object
329
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
330
+
331
+ # Customize the options with defaults
332
+ call_metadata = @config.rpcs.update_security_settings.metadata.to_h
333
+
334
+ # Set x-goog-api-client and x-goog-user-project headers
335
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
336
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
337
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
338
+ transports_version_send: [:rest]
339
+
340
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
341
+
342
+ options.apply_defaults timeout: @config.rpcs.update_security_settings.timeout,
343
+ metadata: call_metadata,
344
+ retry_policy: @config.rpcs.update_security_settings.retry_policy
345
+
346
+ options.apply_defaults timeout: @config.timeout,
347
+ metadata: @config.metadata,
348
+ retry_policy: @config.retry_policy
349
+
350
+ @security_settings_service_stub.update_security_settings request, options do |result, operation|
351
+ yield result, operation if block_given?
352
+ return result
353
+ end
354
+ rescue ::Gapic::Rest::Error => e
355
+ raise ::Google::Cloud::Error.from_error(e)
356
+ end
357
+
358
+ ##
359
+ # Returns the list of all security settings in the specified location.
360
+ #
361
+ # @overload list_security_settings(request, options = nil)
362
+ # Pass arguments to `list_security_settings` via a request object, either of type
363
+ # {::Google::Cloud::Dialogflow::CX::V3::ListSecuritySettingsRequest} or an equivalent Hash.
364
+ #
365
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ListSecuritySettingsRequest, ::Hash]
366
+ # A request object representing the call parameters. Required. To specify no
367
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
368
+ # @param options [::Gapic::CallOptions, ::Hash]
369
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
370
+ #
371
+ # @overload list_security_settings(parent: nil, page_size: nil, page_token: nil)
372
+ # Pass arguments to `list_security_settings` via keyword arguments. Note that at
373
+ # least one keyword argument is required. To specify no parameters, or to keep all
374
+ # the default parameter values, pass an empty Hash as a request object (see above).
375
+ #
376
+ # @param parent [::String]
377
+ # Required. The location to list all security settings for.
378
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
379
+ # @param page_size [::Integer]
380
+ # The maximum number of items to return in a single page. By default 20 and
381
+ # at most 100.
382
+ # @param page_token [::String]
383
+ # The next_page_token value returned from a previous list request.
384
+ # @yield [result, operation] Access the result along with the TransportOperation object
385
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::SecuritySettings>]
386
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
387
+ #
388
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::SecuritySettings>]
389
+ #
390
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
391
+ def list_security_settings request, options = nil
392
+ raise ::ArgumentError, "request must be provided" if request.nil?
393
+
394
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ListSecuritySettingsRequest
395
+
396
+ # Converts hash and nil to an options object
397
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
398
+
399
+ # Customize the options with defaults
400
+ call_metadata = @config.rpcs.list_security_settings.metadata.to_h
401
+
402
+ # Set x-goog-api-client and x-goog-user-project headers
403
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
404
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
405
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
406
+ transports_version_send: [:rest]
407
+
408
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
409
+
410
+ options.apply_defaults timeout: @config.rpcs.list_security_settings.timeout,
411
+ metadata: call_metadata,
412
+ retry_policy: @config.rpcs.list_security_settings.retry_policy
413
+
414
+ options.apply_defaults timeout: @config.timeout,
415
+ metadata: @config.metadata,
416
+ retry_policy: @config.retry_policy
417
+
418
+ @security_settings_service_stub.list_security_settings request, options do |result, operation|
419
+ result = ::Gapic::Rest::PagedEnumerable.new @security_settings_service_stub, :list_security_settings, "security_settings", request, result, options
420
+ yield result, operation if block_given?
421
+ return result
422
+ end
423
+ rescue ::Gapic::Rest::Error => e
424
+ raise ::Google::Cloud::Error.from_error(e)
425
+ end
426
+
427
+ ##
428
+ # Deletes the specified
429
+ # {::Google::Cloud::Dialogflow::CX::V3::SecuritySettings SecuritySettings}.
430
+ #
431
+ # @overload delete_security_settings(request, options = nil)
432
+ # Pass arguments to `delete_security_settings` via a request object, either of type
433
+ # {::Google::Cloud::Dialogflow::CX::V3::DeleteSecuritySettingsRequest} or an equivalent Hash.
434
+ #
435
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::DeleteSecuritySettingsRequest, ::Hash]
436
+ # A request object representing the call parameters. Required. To specify no
437
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
438
+ # @param options [::Gapic::CallOptions, ::Hash]
439
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
440
+ #
441
+ # @overload delete_security_settings(name: nil)
442
+ # Pass arguments to `delete_security_settings` via keyword arguments. Note that at
443
+ # least one keyword argument is required. To specify no parameters, or to keep all
444
+ # the default parameter values, pass an empty Hash as a request object (see above).
445
+ #
446
+ # @param name [::String]
447
+ # Required. The name of the
448
+ # {::Google::Cloud::Dialogflow::CX::V3::SecuritySettings SecuritySettings} to
449
+ # delete. Format: `projects/<Project ID>/locations/<Location
450
+ # ID>/securitySettings/<Security Settings ID>`.
451
+ # @yield [result, operation] Access the result along with the TransportOperation object
452
+ # @yieldparam result [::Google::Protobuf::Empty]
453
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
454
+ #
455
+ # @return [::Google::Protobuf::Empty]
456
+ #
457
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
458
+ def delete_security_settings request, options = nil
459
+ raise ::ArgumentError, "request must be provided" if request.nil?
460
+
461
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::DeleteSecuritySettingsRequest
462
+
463
+ # Converts hash and nil to an options object
464
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
465
+
466
+ # Customize the options with defaults
467
+ call_metadata = @config.rpcs.delete_security_settings.metadata.to_h
468
+
469
+ # Set x-goog-api-client and x-goog-user-project headers
470
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
471
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
472
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
473
+ transports_version_send: [:rest]
474
+
475
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
476
+
477
+ options.apply_defaults timeout: @config.rpcs.delete_security_settings.timeout,
478
+ metadata: call_metadata,
479
+ retry_policy: @config.rpcs.delete_security_settings.retry_policy
480
+
481
+ options.apply_defaults timeout: @config.timeout,
482
+ metadata: @config.metadata,
483
+ retry_policy: @config.retry_policy
484
+
485
+ @security_settings_service_stub.delete_security_settings request, options do |result, operation|
486
+ yield result, operation if block_given?
487
+ return result
488
+ end
489
+ rescue ::Gapic::Rest::Error => e
490
+ raise ::Google::Cloud::Error.from_error(e)
491
+ end
492
+
493
+ ##
494
+ # Configuration class for the SecuritySettingsService REST API.
495
+ #
496
+ # This class represents the configuration for SecuritySettingsService REST,
497
+ # providing control over timeouts, retry behavior, logging, transport
498
+ # parameters, and other low-level controls. Certain parameters can also be
499
+ # applied individually to specific RPCs. See
500
+ # {::Google::Cloud::Dialogflow::CX::V3::SecuritySettingsService::Rest::Client::Configuration::Rpcs}
501
+ # for a list of RPCs that can be configured independently.
502
+ #
503
+ # Configuration can be applied globally to all clients, or to a single client
504
+ # on construction.
505
+ #
506
+ # @example
507
+ #
508
+ # # Modify the global config, setting the timeout for
509
+ # # create_security_settings to 20 seconds,
510
+ # # and all remaining timeouts to 10 seconds.
511
+ # ::Google::Cloud::Dialogflow::CX::V3::SecuritySettingsService::Rest::Client.configure do |config|
512
+ # config.timeout = 10.0
513
+ # config.rpcs.create_security_settings.timeout = 20.0
514
+ # end
515
+ #
516
+ # # Apply the above configuration only to a new client.
517
+ # client = ::Google::Cloud::Dialogflow::CX::V3::SecuritySettingsService::Rest::Client.new do |config|
518
+ # config.timeout = 10.0
519
+ # config.rpcs.create_security_settings.timeout = 20.0
520
+ # end
521
+ #
522
+ # @!attribute [rw] endpoint
523
+ # The hostname or hostname:port of the service endpoint.
524
+ # Defaults to `"dialogflow.googleapis.com"`.
525
+ # @return [::String]
526
+ # @!attribute [rw] credentials
527
+ # Credentials to send with calls. You may provide any of the following types:
528
+ # * (`String`) The path to a service account key file in JSON format
529
+ # * (`Hash`) A service account key as a Hash
530
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
531
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
532
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
533
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
534
+ # * (`nil`) indicating no credentials
535
+ # @return [::Object]
536
+ # @!attribute [rw] scope
537
+ # The OAuth scopes
538
+ # @return [::Array<::String>]
539
+ # @!attribute [rw] lib_name
540
+ # The library name as recorded in instrumentation and logging
541
+ # @return [::String]
542
+ # @!attribute [rw] lib_version
543
+ # The library version as recorded in instrumentation and logging
544
+ # @return [::String]
545
+ # @!attribute [rw] timeout
546
+ # The call timeout in seconds.
547
+ # @return [::Numeric]
548
+ # @!attribute [rw] metadata
549
+ # Additional headers to be sent with the call.
550
+ # @return [::Hash{::Symbol=>::String}]
551
+ # @!attribute [rw] retry_policy
552
+ # The retry policy. The value is a hash with the following keys:
553
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
554
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
555
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
556
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
557
+ # trigger a retry.
558
+ # @return [::Hash]
559
+ # @!attribute [rw] quota_project
560
+ # A separate project against which to charge quota.
561
+ # @return [::String]
562
+ #
563
+ class Configuration
564
+ extend ::Gapic::Config
565
+
566
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
567
+ config_attr :credentials, nil do |value|
568
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
569
+ allowed.any? { |klass| klass === value }
570
+ end
571
+ config_attr :scope, nil, ::String, ::Array, nil
572
+ config_attr :lib_name, nil, ::String, nil
573
+ config_attr :lib_version, nil, ::String, nil
574
+ config_attr :timeout, nil, ::Numeric, nil
575
+ config_attr :metadata, nil, ::Hash, nil
576
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
577
+ config_attr :quota_project, nil, ::String, nil
578
+
579
+ # @private
580
+ # Overrides for http bindings for the RPCs of this service
581
+ # are only used when this service is used as mixin, and only
582
+ # by the host service.
583
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
584
+ config_attr :bindings_override, {}, ::Hash, nil
585
+
586
+ # @private
587
+ def initialize parent_config = nil
588
+ @parent_config = parent_config unless parent_config.nil?
589
+
590
+ yield self if block_given?
591
+ end
592
+
593
+ ##
594
+ # Configurations for individual RPCs
595
+ # @return [Rpcs]
596
+ #
597
+ def rpcs
598
+ @rpcs ||= begin
599
+ parent_rpcs = nil
600
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
601
+ Rpcs.new parent_rpcs
602
+ end
603
+ end
604
+
605
+ ##
606
+ # Configuration RPC class for the SecuritySettingsService API.
607
+ #
608
+ # Includes fields providing the configuration for each RPC in this service.
609
+ # Each configuration object is of type `Gapic::Config::Method` and includes
610
+ # the following configuration fields:
611
+ #
612
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
613
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
614
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
615
+ # include the following keys:
616
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
617
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
618
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
619
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
620
+ # trigger a retry.
621
+ #
622
+ class Rpcs
623
+ ##
624
+ # RPC-specific configuration for `create_security_settings`
625
+ # @return [::Gapic::Config::Method]
626
+ #
627
+ attr_reader :create_security_settings
628
+ ##
629
+ # RPC-specific configuration for `get_security_settings`
630
+ # @return [::Gapic::Config::Method]
631
+ #
632
+ attr_reader :get_security_settings
633
+ ##
634
+ # RPC-specific configuration for `update_security_settings`
635
+ # @return [::Gapic::Config::Method]
636
+ #
637
+ attr_reader :update_security_settings
638
+ ##
639
+ # RPC-specific configuration for `list_security_settings`
640
+ # @return [::Gapic::Config::Method]
641
+ #
642
+ attr_reader :list_security_settings
643
+ ##
644
+ # RPC-specific configuration for `delete_security_settings`
645
+ # @return [::Gapic::Config::Method]
646
+ #
647
+ attr_reader :delete_security_settings
648
+
649
+ # @private
650
+ def initialize parent_rpcs = nil
651
+ create_security_settings_config = parent_rpcs.create_security_settings if parent_rpcs.respond_to? :create_security_settings
652
+ @create_security_settings = ::Gapic::Config::Method.new create_security_settings_config
653
+ get_security_settings_config = parent_rpcs.get_security_settings if parent_rpcs.respond_to? :get_security_settings
654
+ @get_security_settings = ::Gapic::Config::Method.new get_security_settings_config
655
+ update_security_settings_config = parent_rpcs.update_security_settings if parent_rpcs.respond_to? :update_security_settings
656
+ @update_security_settings = ::Gapic::Config::Method.new update_security_settings_config
657
+ list_security_settings_config = parent_rpcs.list_security_settings if parent_rpcs.respond_to? :list_security_settings
658
+ @list_security_settings = ::Gapic::Config::Method.new list_security_settings_config
659
+ delete_security_settings_config = parent_rpcs.delete_security_settings if parent_rpcs.respond_to? :delete_security_settings
660
+ @delete_security_settings = ::Gapic::Config::Method.new delete_security_settings_config
661
+
662
+ yield self if block_given?
663
+ end
664
+ end
665
+ end
666
+ end
667
+ end
668
+ end
669
+ end
670
+ end
671
+ end
672
+ end
673
+ end