Class: Openlayer::Models::BackgroundTaskRetrieveResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openlayer/models/background_task_retrieve_response.rb,
sig/openlayer/models/background_task_retrieve_response.rbs

Overview

See Also:

  • Openlayer::Resources::BackgroundTasks#retrieve

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, complete:, date_created:, date_updated:, name:, progress:, error: nil, outputs: nil) ⇒ Object

Some parameter documentations has been truncated, see Openlayer::Models::BackgroundTaskRetrieveResponse for more details.

Parameters:

  • id (String) —

    The background task id.

  • complete (Boolean) —

    Whether the task has finished. Check this before reading outputs.

  • date_created (Time) —

    When the task was queued.

  • date_updated (Time) —

    When the task last reported progress.

  • name (String) —

    The task's internal name, including the arguments it was queued with.

  • progress (Float) —

    How far along the task is, from 0 to 100.

  • error (String, nil) (defaults to: nil) —

    Why the task failed, or null if it has not failed.

  • outputs (Object, nil) (defaults to: nil) —

    Whatever the task produced, keyed by name. null until the task completes. A fr



# File 'lib/openlayer/models/background_task_retrieve_response.rb', line 60

Instance Attribute Details

#complete ⇒ Boolean

Whether the task has finished. Check this before reading outputs.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


11
# File 'lib/openlayer/models/background_task_retrieve_response.rb', line 11

required :complete, Openlayer::Internal::Type::Boolean

#date_created ⇒ Time

Returns the value of attribute date_created.

Returns:

  • (Time)


26
27
28
# File 'sig/openlayer/models/background_task_retrieve_response.rbs', line 26

def date_created
  @date_created
end

#date_updated ⇒ Time

Returns the value of attribute date_updated.

Returns:

  • (Time)


28
29
30
# File 'sig/openlayer/models/background_task_retrieve_response.rbs', line 28

def date_updated
  @date_updated
end

#error ⇒ String?

Why the task failed, or null if it has not failed.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


23
# File 'lib/openlayer/models/background_task_retrieve_response.rb', line 23

optional :error, String, nil?: true

#id ⇒ String

Returns the value of attribute id.

Returns:

  • (String)


24
25
26
# File 'sig/openlayer/models/background_task_retrieve_response.rbs', line 24

def id
  @id
end

#name ⇒ String

Returns the value of attribute name.

Returns:

  • (String)


30
31
32
# File 'sig/openlayer/models/background_task_retrieve_response.rbs', line 30

def name
  @name
end

#outputs ⇒ Object?

Whatever the task produced, keyed by name. null until the task completes. A framework export returns storageUri -- pass it to GET /storage/presigned-url to download the archive -- along with filename, controlCount, evidenceCount and missingEvidenceCount.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


32
# File 'lib/openlayer/models/background_task_retrieve_response.rb', line 32

optional :outputs, Openlayer::Internal::Type::Unknown, nil?: true

#progress ⇒ Float

How far along the task is, from 0 to 100.

Parameters:

  • value (Float)

Returns:

  • (Float)


17
# File 'lib/openlayer/models/background_task_retrieve_response.rb', line 17

required :progress, Float

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


43
# File 'sig/openlayer/models/background_task_retrieve_response.rbs', line 43

def to_hash: -> {