Class: OCI::DataCatalog::Models::JobSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_catalog/models/job_summary.rb

Overview

Details of a job. Jobs are scheduled instances of a job definition.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ JobSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



169
170
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/oci/data_catalog/models/job_summary.rb', line 169

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

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

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

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

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

  self.catalog_id = attributes[:'catalogId'] if attributes[:'catalogId']

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

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

  self.job_definition_key = attributes[:'jobDefinitionKey'] if attributes[:'jobDefinitionKey']

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.job_type = attributes[:'jobType'] if attributes[:'jobType']

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

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

  self.schedule_type = attributes[:'scheduleType'] if attributes[:'scheduleType']

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

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

  self.created_by_id = attributes[:'createdById'] if attributes[:'createdById']

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

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

  self.updated_by_id = attributes[:'updatedById'] if attributes[:'updatedById']

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

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

  self.schedule_cron_expression = attributes[:'scheduleCronExpression'] if attributes[:'scheduleCronExpression']

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

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

  self.time_schedule_begin = attributes[:'timeScheduleBegin'] if attributes[:'timeScheduleBegin']

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

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

  self.execution_count = attributes[:'executionCount'] if attributes[:'executionCount']

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

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

  self.time_of_latest_execution = attributes[:'timeOfLatestExecution'] if attributes[:'timeOfLatestExecution']

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

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

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

Instance Attribute Details

#catalog_idString

The data catalog's OCID.

Returns:

  • (String)


27
28
29
# File 'lib/oci/data_catalog/models/job_summary.rb', line 27

def catalog_id
  @catalog_id
end

#created_by_idString

OCID of the user who created this job.

Returns:

  • (String)


61
62
63
# File 'lib/oci/data_catalog/models/job_summary.rb', line 61

def created_by_id
  @created_by_id
end

#descriptionString

Detailed description of the job.

Returns:

  • (String)


47
48
49
# File 'lib/oci/data_catalog/models/job_summary.rb', line 47

def description
  @description
end

#display_nameString

A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Returns:

  • (String)


23
24
25
# File 'lib/oci/data_catalog/models/job_summary.rb', line 23

def display_name
  @display_name
end

#execution_countInteger

The total number of executions for this job schedule.

Returns:

  • (Integer)


81
82
83
# File 'lib/oci/data_catalog/models/job_summary.rb', line 81

def execution_count
  @execution_count
end

#executionsArray<OCI::DataCatalog::Models::JobExecutionSummary>

Array of the executions summary associated with this job.



91
92
93
# File 'lib/oci/data_catalog/models/job_summary.rb', line 91

def executions
  @executions
end

#job_definition_keyString

The unique key of the job definition resource that defined the scope of this job.

Returns:

  • (String)


31
32
33
# File 'lib/oci/data_catalog/models/job_summary.rb', line 31

def job_definition_key
  @job_definition_key
end

#job_typeString

Type of the job.

Returns:

  • (String)


39
40
41
# File 'lib/oci/data_catalog/models/job_summary.rb', line 39

def job_type
  @job_type
end

#keyString

[Required] Unique key of the job.

Returns:

  • (String)


13
14
15
# File 'lib/oci/data_catalog/models/job_summary.rb', line 13

def key
  @key
end

#lifecycle_stateString

Lifecycle state of the job, such as running, paused, or completed.

Returns:

  • (String)


35
36
37
# File 'lib/oci/data_catalog/models/job_summary.rb', line 35

def lifecycle_state
  @lifecycle_state
end

#schedule_cron_expressionString

Schedule specified in the cron expression format that has seven fields for second, minute, hour, day-of-month, month, day-of-week, year. It can also include special characters like * for all and ? for any. There are also pre-defined schedules that can be specified using special strings. For example, @hourly will run the job every hour.

Returns:

  • (String)


72
73
74
# File 'lib/oci/data_catalog/models/job_summary.rb', line 72

def schedule_cron_expression
  @schedule_cron_expression
end

#schedule_typeString

Type of job schedule that is inferred from the scheduling properties.

Returns:

  • (String)


43
44
45
# File 'lib/oci/data_catalog/models/job_summary.rb', line 43

def schedule_type
  @schedule_type
end

#time_createdDateTime

The date and time the job was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z

Returns:

  • (DateTime)


53
54
55
# File 'lib/oci/data_catalog/models/job_summary.rb', line 53

def time_created
  @time_created
end

#time_of_latest_executionDateTime

The date and time of the most recent execution for this job, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z

Returns:

  • (DateTime)


87
88
89
# File 'lib/oci/data_catalog/models/job_summary.rb', line 87

def time_of_latest_execution
  @time_of_latest_execution
end

#time_schedule_beginDateTime

Date that the schedule should be operational. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


76
77
78
# File 'lib/oci/data_catalog/models/job_summary.rb', line 76

def time_schedule_begin
  @time_schedule_begin
end

#time_updatedDateTime

Time that this job was last updated. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


57
58
59
# File 'lib/oci/data_catalog/models/job_summary.rb', line 57

def time_updated
  @time_updated
end

#updated_by_idString

OCID of the user who updated this job.

Returns:

  • (String)


65
66
67
# File 'lib/oci/data_catalog/models/job_summary.rb', line 65

def updated_by_id
  @updated_by_id
end

#uriString

URI to the job instance in the API.

Returns:

  • (String)


17
18
19
# File 'lib/oci/data_catalog/models/job_summary.rb', line 17

def uri
  @uri
end

Class Method Details

.attribute_mapObject

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



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/oci/data_catalog/models/job_summary.rb', line 94

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'uri': :'uri',
    'display_name': :'displayName',
    'catalog_id': :'catalogId',
    'job_definition_key': :'jobDefinitionKey',
    'lifecycle_state': :'lifecycleState',
    'job_type': :'jobType',
    'schedule_type': :'scheduleType',
    'description': :'description',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'created_by_id': :'createdById',
    'updated_by_id': :'updatedById',
    'schedule_cron_expression': :'scheduleCronExpression',
    'time_schedule_begin': :'timeScheduleBegin',
    'execution_count': :'executionCount',
    'time_of_latest_execution': :'timeOfLatestExecution',
    'executions': :'executions'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/oci/data_catalog/models/job_summary.rb', line 120

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'uri': :'String',
    'display_name': :'String',
    'catalog_id': :'String',
    'job_definition_key': :'String',
    'lifecycle_state': :'String',
    'job_type': :'String',
    'schedule_type': :'String',
    'description': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'created_by_id': :'String',
    'updated_by_id': :'String',
    'schedule_cron_expression': :'String',
    'time_schedule_begin': :'DateTime',
    'execution_count': :'Integer',
    'time_of_latest_execution': :'DateTime',
    'executions': :'Array<OCI::DataCatalog::Models::JobExecutionSummary>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/oci/data_catalog/models/job_summary.rb', line 275

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

  self.class == other.class &&
    key == other.key &&
    uri == other.uri &&
    display_name == other.display_name &&
    catalog_id == other.catalog_id &&
    job_definition_key == other.job_definition_key &&
    lifecycle_state == other.lifecycle_state &&
    job_type == other.job_type &&
    schedule_type == other.schedule_type &&
    description == other.description &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    created_by_id == other.created_by_id &&
    updated_by_id == other.updated_by_id &&
    schedule_cron_expression == other.schedule_cron_expression &&
    time_schedule_begin == other.time_schedule_begin &&
    execution_count == other.execution_count &&
    time_of_latest_execution == other.time_of_latest_execution &&
    executions == other.executions
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/oci/data_catalog/models/job_summary.rb', line 322

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


302
303
304
# File 'lib/oci/data_catalog/models/job_summary.rb', line 302

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



311
312
313
# File 'lib/oci/data_catalog/models/job_summary.rb', line 311

def hash
  [key, uri, display_name, catalog_id, job_definition_key, lifecycle_state, job_type, schedule_type, description, time_created, time_updated, created_by_id, updated_by_id, schedule_cron_expression, time_schedule_begin, execution_count, time_of_latest_execution, executions].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



355
356
357
358
359
360
361
362
363
364
# File 'lib/oci/data_catalog/models/job_summary.rb', line 355

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

Returns:

  • (String)

    String presentation of the object



349
350
351
# File 'lib/oci/data_catalog/models/job_summary.rb', line 349

def to_s
  to_hash.to_s
end