Class: OCI::DataIntegration::Models::TaskRunSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_integration/models/task_run_summary.rb

Overview

The information about a task run.

Constant Summary collapse

STATUS_ENUM =
[
  STATUS_NOT_STARTED = 'NOT_STARTED'.freeze,
  STATUS_QUEUED = 'QUEUED'.freeze,
  STATUS_RUNNING = 'RUNNING'.freeze,
  STATUS_TERMINATING = 'TERMINATING'.freeze,
  STATUS_TERMINATED = 'TERMINATED'.freeze,
  STATUS_SUCCESS = 'SUCCESS'.freeze,
  STATUS_ERROR = 'ERROR'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
TASK_TYPE_ENUM =
[
  TASK_TYPE_INTEGRATION_TASK = 'INTEGRATION_TASK'.freeze,
  TASK_TYPE_DATA_LOADER_TASK = 'DATA_LOADER_TASK'.freeze,
  TASK_TYPE_PIPELINE_TASK = 'PIPELINE_TASK'.freeze,
  TASK_TYPE_SQL_TASK = 'SQL_TASK'.freeze,
  TASK_TYPE_OCI_DATAFLOW_TASK = 'OCI_DATAFLOW_TASK'.freeze,
  TASK_TYPE_REST_TASK = 'REST_TASK'.freeze,
  TASK_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ TaskRunSummary

Initializes the object

Options Hash (attributes):



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 171

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  self.key = attributes[:'key'] if attributes[:'key']

  self.model_type = attributes[:'modelType'] if attributes[:'modelType']

  raise 'You cannot provide both :modelType and :model_type' if attributes.key?(:'modelType') && attributes.key?(:'model_type')

  self.model_type = attributes[:'model_type'] if attributes[:'model_type']

  self.model_version = attributes[:'modelVersion'] if attributes[:'modelVersion']

  raise 'You cannot provide both :modelVersion and :model_version' if attributes.key?(:'modelVersion') && attributes.key?(:'model_version')

  self.model_version = attributes[:'model_version'] if attributes[:'model_version']

  self.parent_ref = attributes[:'parentRef'] if attributes[:'parentRef']

  raise 'You cannot provide both :parentRef and :parent_ref' if attributes.key?(:'parentRef') && attributes.key?(:'parent_ref')

  self.parent_ref = attributes[:'parent_ref'] if attributes[:'parent_ref']

  self.name = attributes[:'name'] if attributes[:'name']

  self.description = attributes[:'description'] if attributes[:'description']

  self.object_version = attributes[:'objectVersion'] if attributes[:'objectVersion']

  raise 'You cannot provide both :objectVersion and :object_version' if attributes.key?(:'objectVersion') && attributes.key?(:'object_version')

  self.object_version = attributes[:'object_version'] if attributes[:'object_version']

  self.status = attributes[:'status'] if attributes[:'status']

  self.start_time_millis = attributes[:'startTimeMillis'] if attributes[:'startTimeMillis']

  raise 'You cannot provide both :startTimeMillis and :start_time_millis' if attributes.key?(:'startTimeMillis') && attributes.key?(:'start_time_millis')

  self.start_time_millis = attributes[:'start_time_millis'] if attributes[:'start_time_millis']

  self.end_time_millis = attributes[:'endTimeMillis'] if attributes[:'endTimeMillis']

  raise 'You cannot provide both :endTimeMillis and :end_time_millis' if attributes.key?(:'endTimeMillis') && attributes.key?(:'end_time_millis')

  self.end_time_millis = attributes[:'end_time_millis'] if attributes[:'end_time_millis']

  self.last_updated = attributes[:'lastUpdated'] if attributes[:'lastUpdated']

  raise 'You cannot provide both :lastUpdated and :last_updated' if attributes.key?(:'lastUpdated') && attributes.key?(:'last_updated')

  self.last_updated = attributes[:'last_updated'] if attributes[:'last_updated']

  self.records_written = attributes[:'recordsWritten'] if attributes[:'recordsWritten']

  raise 'You cannot provide both :recordsWritten and :records_written' if attributes.key?(:'recordsWritten') && attributes.key?(:'records_written')

  self.records_written = attributes[:'records_written'] if attributes[:'records_written']

  self.bytes_processed = attributes[:'bytesProcessed'] if attributes[:'bytesProcessed']

  raise 'You cannot provide both :bytesProcessed and :bytes_processed' if attributes.key?(:'bytesProcessed') && attributes.key?(:'bytes_processed')

  self.bytes_processed = attributes[:'bytes_processed'] if attributes[:'bytes_processed']

  self.object_status = attributes[:'objectStatus'] if attributes[:'objectStatus']

  raise 'You cannot provide both :objectStatus and :object_status' if attributes.key?(:'objectStatus') && attributes.key?(:'object_status')

  self.object_status = attributes[:'object_status'] if attributes[:'object_status']

  self.task_type = attributes[:'taskType'] if attributes[:'taskType']

  raise 'You cannot provide both :taskType and :task_type' if attributes.key?(:'taskType') && attributes.key?(:'task_type')

  self.task_type = attributes[:'task_type'] if attributes[:'task_type']

  self.identifier = attributes[:'identifier'] if attributes[:'identifier']

  self. = attributes[:'metadata'] if attributes[:'metadata']
end

Instance Attribute Details

#bytes_processedInteger

Number of bytes processed in task run.



81
82
83
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 81

def bytes_processed
  @bytes_processed
end

#descriptionString

Detailed description for the object.



53
54
55
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 53

def description
  @description
end

#end_time_millisInteger

The task run end time.



69
70
71
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 69

def end_time_millis
  @end_time_millis
end

#identifierString

Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified.



93
94
95
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 93

def identifier
  @identifier
end

#keyString

The object key.



34
35
36
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 34

def key
  @key
end

#last_updatedInteger

The date and time the task run was last updated.



73
74
75
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 73

def last_updated
  @last_updated
end

#metadataOCI::DataIntegration::Models::ObjectMetadata



96
97
98
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 96

def 
  
end

#model_typeString

The object type.



38
39
40
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 38

def model_type
  @model_type
end

#model_versionString

The object’s model version.



42
43
44
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 42

def model_version
  @model_version
end

#nameString

Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters.



49
50
51
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 49

def name
  @name
end

#object_statusInteger

The status of an object that can be set to value 1 for shallow references across objects, other values reserved.



85
86
87
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 85

def object_status
  @object_status
end

#object_versionInteger

The version of the object that is used to track changes in the object instance.



57
58
59
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 57

def object_version
  @object_version
end

#parent_refOCI::DataIntegration::Models::ParentReference



45
46
47
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 45

def parent_ref
  @parent_ref
end

#records_writtenInteger

Number of records processed in task run.



77
78
79
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 77

def records_written
  @records_written
end

#start_time_millisInteger

The task run start time.



65
66
67
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 65

def start_time_millis
  @start_time_millis
end

#statusString

status



61
62
63
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 61

def status
  @status
end

#task_typeString

The type of the task for the run.



89
90
91
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 89

def task_type
  @task_type
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 99

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'model_type': :'modelType',
    'model_version': :'modelVersion',
    'parent_ref': :'parentRef',
    'name': :'name',
    'description': :'description',
    'object_version': :'objectVersion',
    'status': :'status',
    'start_time_millis': :'startTimeMillis',
    'end_time_millis': :'endTimeMillis',
    'last_updated': :'lastUpdated',
    'records_written': :'recordsWritten',
    'bytes_processed': :'bytesProcessed',
    'object_status': :'objectStatus',
    'task_type': :'taskType',
    'identifier': :'identifier',
    'metadata': :'metadata'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 124

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'model_type': :'String',
    'model_version': :'String',
    'parent_ref': :'OCI::DataIntegration::Models::ParentReference',
    'name': :'String',
    'description': :'String',
    'object_version': :'Integer',
    'status': :'String',
    'start_time_millis': :'Integer',
    'end_time_millis': :'Integer',
    'last_updated': :'Integer',
    'records_written': :'Integer',
    'bytes_processed': :'Integer',
    'object_status': :'Integer',
    'task_type': :'String',
    'identifier': :'String',
    'metadata': :'OCI::DataIntegration::Models::ObjectMetadata'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.



286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 286

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    key == other.key &&
    model_type == other.model_type &&
    model_version == other.model_version &&
    parent_ref == other.parent_ref &&
    name == other.name &&
    description == other.description &&
    object_version == other.object_version &&
    status == other.status &&
    start_time_millis == other.start_time_millis &&
    end_time_millis == other.end_time_millis &&
    last_updated == other.last_updated &&
    records_written == other.records_written &&
    bytes_processed == other.bytes_processed &&
    object_status == other.object_status &&
    task_type == other.task_type &&
    identifier == other.identifier &&
     == other.
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 332

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

See Also:

  • `==` method


312
313
314
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 312

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.



321
322
323
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 321

def hash
  [key, model_type, model_version, parent_ref, name, description, object_version, status, start_time_millis, end_time_millis, last_updated, records_written, bytes_processed, object_status, task_type, identifier, ].hash
end

#to_hashHash

Returns the object in the form of hash



365
366
367
368
369
370
371
372
373
374
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 365

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object



359
360
361
# File 'lib/oci/data_integration/models/task_run_summary.rb', line 359

def to_s
  to_hash.to_s
end