Class: OCI::Oda::ManagementClientCompositeOperations

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/oda/management_client_composite_operations.rb

Overview

This class provides a wrapper around ManagementClient and offers convenience methods for operations that would otherwise need to be chained together. For example, instead of performing an action on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource to enter a given state, you can call a single method in this class to accomplish the same functionality

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_client = OCI::Oda::ManagementClient.new) ⇒ ManagementClientCompositeOperations

Initializes a new ManagementClientCompositeOperations

Parameters:



22
23
24
# File 'lib/oci/oda/management_client_composite_operations.rb', line 22

def initialize(service_client = OCI::Oda::ManagementClient.new)
  @service_client = service_client
end

Instance Attribute Details

#service_clientOCI::Oda::ManagementClient (readonly)

The OCI::Oda::ManagementClient used to communicate with the service_client



16
17
18
# File 'lib/oci/oda/management_client_composite_operations.rb', line 16

def service_client
  @service_client
end

Instance Method Details

#bulk_create_skill_entities_and_wait_for_state(oda_instance_id, skill_id, bulk_create_skill_entities_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#bulk_create_skill_entities and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • skill_id (String)

    Unique Skill identifier.

  • bulk_create_skill_entities_details (OCI::Oda::Models::BulkCreateSkillEntitiesDetails)

    Property values for bulk creating a list of skill entities.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#bulk_create_skill_entities

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/oci/oda/management_client_composite_operations.rb', line 43

def bulk_create_skill_entities_and_wait_for_state(oda_instance_id, skill_id, bulk_create_skill_entities_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.bulk_create_skill_entities(oda_instance_id, skill_id, bulk_create_skill_entities_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#cascading_delete_skill_custom_entities_and_wait_for_state(oda_instance_id, skill_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • skill_id (String)

    Unique Skill identifier.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/oci/oda/management_client_composite_operations.rb', line 94

def cascading_delete_skill_custom_entities_and_wait_for_state(oda_instance_id, skill_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.cascading_delete_skill_custom_entities(oda_instance_id, skill_id, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#change_oda_private_endpoint_compartment_and_wait_for_state(oda_private_endpoint_id, change_oda_private_endpoint_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • oda_private_endpoint_id (String)

    Unique ODA Private Endpoint identifier which is the OCID.

  • change_oda_private_endpoint_compartment_details (OCI::Oda::Models::ChangeOdaPrivateEndpointCompartmentDetails)

    The compartment to which the Digital Assistant instance should be moved.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/oci/oda/management_client_composite_operations.rb', line 145

def change_oda_private_endpoint_compartment_and_wait_for_state(oda_private_endpoint_id, change_oda_private_endpoint_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.change_oda_private_endpoint_compartment(oda_private_endpoint_id, change_oda_private_endpoint_compartment_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_authentication_provider_and_wait_for_state(oda_instance_id, create_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#create_authentication_provider and then waits for the OCI::Oda::Models::AuthenticationProvider acted upon to enter the given state(s).

Parameters:

Returns:



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/oci/oda/management_client_composite_operations.rb', line 196

def create_authentication_provider_and_wait_for_state(oda_instance_id, create_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_authentication_provider(oda_instance_id, create_authentication_provider_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_authentication_provider(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_digital_assistant_and_wait_for_state(oda_instance_id, create_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#create_digital_assistant and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • create_digital_assistant_details (OCI::Oda::Models::CreateDigitalAssistantDetails)

    Property values for creating the new Digital Assistant.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#create_digital_assistant

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/oci/oda/management_client_composite_operations.rb', line 236

def create_digital_assistant_and_wait_for_state(oda_instance_id, create_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_digital_assistant(oda_instance_id, create_digital_assistant_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_oda_private_endpoint_and_wait_for_state(create_oda_private_endpoint_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#create_oda_private_endpoint and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • create_oda_private_endpoint_details (OCI::Oda::Models::CreateOdaPrivateEndpointDetails)

    Details for the new ODA Private Endpoint.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#create_oda_private_endpoint

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/oci/oda/management_client_composite_operations.rb', line 286

def create_oda_private_endpoint_and_wait_for_state(create_oda_private_endpoint_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_oda_private_endpoint(create_oda_private_endpoint_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_oda_private_endpoint_attachment_and_wait_for_state(create_oda_private_endpoint_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

Returns:



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/oci/oda/management_client_composite_operations.rb', line 336

def create_oda_private_endpoint_attachment_and_wait_for_state(create_oda_private_endpoint_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_oda_private_endpoint_attachment(create_oda_private_endpoint_attachment_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_oda_private_endpoint_scan_proxy_and_wait_for_state(create_oda_private_endpoint_scan_proxy_details, oda_private_endpoint_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • create_oda_private_endpoint_scan_proxy_details (OCI::Oda::Models::CreateOdaPrivateEndpointScanProxyDetails)

    Details for the new ODA Private Endpoint Scan Proxy.

  • oda_private_endpoint_id (String)

    Unique ODA Private Endpoint identifier which is the OCID.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/oci/oda/management_client_composite_operations.rb', line 387

def create_oda_private_endpoint_scan_proxy_and_wait_for_state(create_oda_private_endpoint_scan_proxy_details, oda_private_endpoint_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_oda_private_endpoint_scan_proxy(create_oda_private_endpoint_scan_proxy_details, oda_private_endpoint_id, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_skill_and_wait_for_state(oda_instance_id, create_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#create_skill and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • create_skill_details (OCI::Oda::Models::CreateSkillDetails)

    Property values for creating the Skill.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#create_skill

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# File 'lib/oci/oda/management_client_composite_operations.rb', line 438

def create_skill_and_wait_for_state(oda_instance_id, create_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_skill(oda_instance_id, create_skill_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, create_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#create_skill_parameter and then waits for the OCI::Oda::Models::SkillParameter acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • skill_id (String)

    Unique Skill identifier.

  • create_skill_parameter_details (OCI::Oda::Models::CreateSkillParameterDetails)

    Property values for creating the new Skill Parameter.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::SkillParameter#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#create_skill_parameter

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# File 'lib/oci/oda/management_client_composite_operations.rb', line 490

def create_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, create_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_skill_parameter(oda_instance_id, skill_id, create_skill_parameter_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_skill_parameter(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_translator_and_wait_for_state(oda_instance_id, create_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#create_translator and then waits for the OCI::Oda::Models::Translator acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • create_translator_details (OCI::Oda::Models::CreateTranslatorDetails)

    Property values to create the new Translator.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::Translator#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#create_translator

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# File 'lib/oci/oda/management_client_composite_operations.rb', line 530

def create_translator_and_wait_for_state(oda_instance_id, create_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_translator(oda_instance_id, create_translator_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_translator(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_oda_private_endpoint_and_wait_for_state(oda_private_endpoint_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#delete_oda_private_endpoint and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • oda_private_endpoint_id (String)

    Unique ODA Private Endpoint identifier which is the OCID.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#delete_oda_private_endpoint

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
# File 'lib/oci/oda/management_client_composite_operations.rb', line 569

def delete_oda_private_endpoint_and_wait_for_state(oda_private_endpoint_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_oda_private_endpoint(oda_private_endpoint_id, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_oda_private_endpoint_attachment_and_wait_for_state(oda_private_endpoint_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • oda_private_endpoint_attachment_id (String)

    The OCID of ODA Private Endpoint Attachment.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
# File 'lib/oci/oda/management_client_composite_operations.rb', line 619

def delete_oda_private_endpoint_attachment_and_wait_for_state(oda_private_endpoint_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_oda_private_endpoint_attachment(oda_private_endpoint_attachment_id, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_oda_private_endpoint_scan_proxy_and_wait_for_state(oda_private_endpoint_scan_proxy_id, oda_private_endpoint_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • oda_private_endpoint_scan_proxy_id (String)

    Unique ODA Private Endpoint Scan Proxy identifier.

  • oda_private_endpoint_id (String)

    Unique ODA Private Endpoint identifier which is the OCID.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
# File 'lib/oci/oda/management_client_composite_operations.rb', line 670

def delete_oda_private_endpoint_scan_proxy_and_wait_for_state(oda_private_endpoint_scan_proxy_id, oda_private_endpoint_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_oda_private_endpoint_scan_proxy(oda_private_endpoint_scan_proxy_id, oda_private_endpoint_id, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#export_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, export_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#export_digital_assistant and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • digital_assistant_id (String)

    Unique Digital Assistant identifier.

  • export_digital_assistant_details (OCI::Oda::Models::ExportDigitalAssistantDetails)

    Where in Object Storage to export the Digital Assistant to.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#export_digital_assistant

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
# File 'lib/oci/oda/management_client_composite_operations.rb', line 722

def export_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, export_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.export_digital_assistant(oda_instance_id, digital_assistant_id, export_digital_assistant_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#export_skill_and_wait_for_state(oda_instance_id, skill_id, export_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#export_skill and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • skill_id (String)

    Unique Skill identifier.

  • export_skill_details (OCI::Oda::Models::ExportSkillDetails)

    Where in Object Storage to export the Skill to.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#export_skill

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# File 'lib/oci/oda/management_client_composite_operations.rb', line 774

def export_skill_and_wait_for_state(oda_instance_id, skill_id, export_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.export_skill(oda_instance_id, skill_id, export_skill_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#import_bot_and_wait_for_state(oda_instance_id, import_bot_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#import_bot and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • import_bot_details (OCI::Oda::Models::ImportBotDetails)

    Properties for where in Object Storage to import the Bot archive from.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#import_bot

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
# File 'lib/oci/oda/management_client_composite_operations.rb', line 825

def import_bot_and_wait_for_state(oda_instance_id, import_bot_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.import_bot(oda_instance_id, import_bot_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#publish_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#publish_digital_assistant and then waits for the OCI::Oda::Models::DigitalAssistant acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • digital_assistant_id (String)

    Unique Digital Assistant identifier.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::DigitalAssistant#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#publish_digital_assistant

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
# File 'lib/oci/oda/management_client_composite_operations.rb', line 876

def publish_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.publish_digital_assistant(oda_instance_id, digital_assistant_id, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_digital_assistant(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#publish_skill_and_wait_for_state(oda_instance_id, skill_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#publish_skill and then waits for the OCI::Oda::Models::Skill acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • skill_id (String)

    Unique Skill identifier.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::Skill#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#publish_skill

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
# File 'lib/oci/oda/management_client_composite_operations.rb', line 916

def publish_skill_and_wait_for_state(oda_instance_id, skill_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.publish_skill(oda_instance_id, skill_id, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_skill(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#start_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#start_channel and then waits for the OCI::Oda::Models::Channel acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • channel_id (String)

    Unique Channel identifier.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::Channel#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#start_channel

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
# File 'lib/oci/oda/management_client_composite_operations.rb', line 956

def start_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.start_channel(oda_instance_id, channel_id, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_channel(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#stop_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#stop_channel and then waits for the OCI::Oda::Models::Channel acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • channel_id (String)

    Unique Channel identifier.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::Channel#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#stop_channel

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
# File 'lib/oci/oda/management_client_composite_operations.rb', line 996

def stop_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.stop_channel(oda_instance_id, channel_id, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_channel(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#train_skill_and_wait_for_state(oda_instance_id, skill_id, train_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#train_skill and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • skill_id (String)

    Unique Skill identifier.

  • train_skill_details (OCI::Oda::Models::TrainSkillDetails)

    Metadata for training a skill.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#train_skill

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
# File 'lib/oci/oda/management_client_composite_operations.rb', line 1037

def train_skill_and_wait_for_state(oda_instance_id, skill_id, train_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.train_skill(oda_instance_id, skill_id, train_skill_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_authentication_provider_and_wait_for_state(oda_instance_id, authentication_provider_id, update_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#update_authentication_provider and then waits for the OCI::Oda::Models::AuthenticationProvider acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • authentication_provider_id (String)

    Unique Authentication Provider identifier.

  • update_authentication_provider_details (OCI::Oda::Models::UpdateAuthenticationProviderDetails)

    Property values to update the Authentication Provider.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::AuthenticationProvider#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
# File 'lib/oci/oda/management_client_composite_operations.rb', line 1089

def update_authentication_provider_and_wait_for_state(oda_instance_id, authentication_provider_id, update_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_authentication_provider(oda_instance_id, authentication_provider_id, update_authentication_provider_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_authentication_provider(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_channel_and_wait_for_state(oda_instance_id, channel_id, update_channel_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#update_channel and then waits for the OCI::Oda::Models::Channel acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • channel_id (String)

    Unique Channel identifier.

  • update_channel_details (OCI::Oda::Models::UpdateChannelDetails)

    Property values to update the Channel.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::Channel#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#update_channel

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
# File 'lib/oci/oda/management_client_composite_operations.rb', line 1130

def update_channel_and_wait_for_state(oda_instance_id, channel_id, update_channel_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_channel(oda_instance_id, channel_id, update_channel_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_channel(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, update_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#update_digital_assistant and then waits for the OCI::Oda::Models::DigitalAssistant acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • digital_assistant_id (String)

    Unique Digital Assistant identifier.

  • update_digital_assistant_details (OCI::Oda::Models::UpdateDigitalAssistantDetails)

    Property values to update the Digital Assistant.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::DigitalAssistant#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#update_digital_assistant

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
# File 'lib/oci/oda/management_client_composite_operations.rb', line 1171

def update_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, update_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_digital_assistant(oda_instance_id, digital_assistant_id, update_digital_assistant_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_digital_assistant(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_digital_assistant_parameter_and_wait_for_state(oda_instance_id, digital_assistant_id, parameter_name, update_digital_assistant_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#update_digital_assistant_parameter and then waits for the OCI::Oda::Models::DigitalAssistantParameter acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • digital_assistant_id (String)

    Unique Digital Assistant identifier.

  • parameter_name (String)

    The name of a Digital Assistant Parameter. This is unique with the Digital Assistant.

  • update_digital_assistant_parameter_details (OCI::Oda::Models::UpdateDigitalAssistantParameterDetails)

    Property values to update the Digital Assistant Parameter.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::DigitalAssistantParameter#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
# File 'lib/oci/oda/management_client_composite_operations.rb', line 1213

def update_digital_assistant_parameter_and_wait_for_state(oda_instance_id, digital_assistant_id, parameter_name, update_digital_assistant_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_digital_assistant_parameter(oda_instance_id, digital_assistant_id, parameter_name, update_digital_assistant_parameter_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_digital_assistant_parameter(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_oda_private_endpoint_and_wait_for_state(oda_private_endpoint_id, update_oda_private_endpoint_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#update_oda_private_endpoint and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).

Parameters:

  • oda_private_endpoint_id (String)

    Unique ODA Private Endpoint identifier which is the OCID.

  • update_oda_private_endpoint_details (OCI::Oda::Models::UpdateOdaPrivateEndpointDetails)

    The information to update.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#update_oda_private_endpoint

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
# File 'lib/oci/oda/management_client_composite_operations.rb', line 1253

def update_oda_private_endpoint_and_wait_for_state(oda_private_endpoint_id, update_oda_private_endpoint_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_oda_private_endpoint(oda_private_endpoint_id, update_oda_private_endpoint_details, base_operation_opts)
  use_util = OCI::Oda::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  begin
    if use_util
      waiter_result = OCI::Oda::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_skill_and_wait_for_state(oda_instance_id, skill_id, update_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#update_skill and then waits for the OCI::Oda::Models::Skill acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • skill_id (String)

    Unique Skill identifier.

  • update_skill_details (OCI::Oda::Models::UpdateSkillDetails)

    Property values to update the Skill.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::Skill#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#update_skill

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
# File 'lib/oci/oda/management_client_composite_operations.rb', line 1305

def update_skill_and_wait_for_state(oda_instance_id, skill_id, update_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_skill(oda_instance_id, skill_id, update_skill_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_skill(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, parameter_name, update_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#update_skill_parameter and then waits for the OCI::Oda::Models::SkillParameter acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • skill_id (String)

    Unique Skill identifier.

  • parameter_name (String)

    The name of a Skill Parameter.

  • update_skill_parameter_details (OCI::Oda::Models::UpdateSkillParameterDetails)

    Property values to update the Skill Parameter.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::SkillParameter#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#update_skill_parameter

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
# File 'lib/oci/oda/management_client_composite_operations.rb', line 1347

def update_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, parameter_name, update_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_skill_parameter(oda_instance_id, skill_id, parameter_name, update_skill_parameter_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_skill_parameter(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_translator_and_wait_for_state(oda_instance_id, translator_id, update_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Oda::ManagementClient#update_translator and then waits for the OCI::Oda::Models::Translator acted upon to enter the given state(s).

Parameters:

  • oda_instance_id (String)

    Unique Digital Assistant instance identifier.

  • translator_id (String)

    Unique Translator identifier.

  • update_translator_details (OCI::Oda::Models::UpdateTranslatorDetails)

    Property values to update the Translator.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for OCI::Oda::Models::Translator#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::Oda::ManagementClient#update_translator

  • waiter_opts (Hash) (defaults to: {})

    Optional arguments for the waiter. Keys should be symbols, and the following keys are supported: * max_interval_seconds: The maximum interval between queries, in seconds. * max_wait_seconds The maximum time to wait, in seconds

Returns:



1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
# File 'lib/oci/oda/management_client_composite_operations.rb', line 1388

def update_translator_and_wait_for_state(oda_instance_id, translator_id, update_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_translator(oda_instance_id, translator_id, update_translator_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_translator(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
      max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
      max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
    )
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end