Class: OCI::DataCatalog::Models::CreateJobExecutionDetails

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

Overview

Properties for creating a new job execution.

Constant Summary collapse

JOB_TYPE_ENUM =
[
  JOB_TYPE_HARVEST = 'HARVEST'.freeze,
  JOB_TYPE_PROFILING = 'PROFILING'.freeze,
  JOB_TYPE_SAMPLING = 'SAMPLING'.freeze,
  JOB_TYPE_PREVIEW = 'PREVIEW'.freeze,
  JOB_TYPE_IMPORT = 'IMPORT'.freeze,
  JOB_TYPE_EXPORT = 'EXPORT'.freeze,
  JOB_TYPE_IMPORT_GLOSSARY = 'IMPORT_GLOSSARY'.freeze,
  JOB_TYPE_EXPORT_GLOSSARY = 'EXPORT_GLOSSARY'.freeze,
  JOB_TYPE_INTERNAL = 'INTERNAL'.freeze,
  JOB_TYPE_PURGE = 'PURGE'.freeze,
  JOB_TYPE_IMMEDIATE = 'IMMEDIATE'.freeze,
  JOB_TYPE_SCHEDULED = 'SCHEDULED'.freeze,
  JOB_TYPE_IMMEDIATE_EXECUTION = 'IMMEDIATE_EXECUTION'.freeze,
  JOB_TYPE_SCHEDULED_EXECUTION = 'SCHEDULED_EXECUTION'.freeze,
  JOB_TYPE_SCHEDULED_EXECUTION_INSTANCE = 'SCHEDULED_EXECUTION_INSTANCE'.freeze,
  JOB_TYPE_ASYNC_DELETE = 'ASYNC_DELETE'.freeze,
  JOB_TYPE_IMPORT_DATA_ASSET = 'IMPORT_DATA_ASSET'.freeze,
  JOB_TYPE_CREATE_SCAN_PROXY = 'CREATE_SCAN_PROXY'.freeze,
  JOB_TYPE_ASYNC_EXPORT_GLOSSARY = 'ASYNC_EXPORT_GLOSSARY'.freeze,
  JOB_TYPE_ASYNC_EXPORT_DATA_ASSET = 'ASYNC_EXPORT_DATA_ASSET'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATED = 'CREATED'.freeze,
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze,
  LIFECYCLE_STATE_SUCCEEDED_WITH_WARNINGS = 'SUCCEEDED_WITH_WARNINGS'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateJobExecutionDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :sub_type (String)

    The value to assign to the #sub_type property

  • :job_type (String)

    The value to assign to the #job_type property

  • :parent_key (String)

    The value to assign to the #parent_key property

  • :time_started (DateTime)

    The value to assign to the #time_started property

  • :time_ended (DateTime)

    The value to assign to the #time_ended property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :error_code (String)

    The value to assign to the #error_code property

  • :error_message (String)

    The value to assign to the #error_message property

  • :schedule_instance_key (String)

    The value to assign to the #schedule_instance_key property

  • :process_key (String)

    The value to assign to the #process_key property

  • :external_url (String)

    The value to assign to the #external_url property

  • :event_key (String)

    The value to assign to the #event_key property

  • :data_entity_key (String)

    The value to assign to the #data_entity_key property

  • :properties (Hash<String, Hash<String, String>>)

    The value to assign to the #properties property



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
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 175

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.sub_type = attributes[:'subType'] if attributes[:'subType']

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

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

  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.parent_key = attributes[:'parentKey'] if attributes[:'parentKey']

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

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

  self.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted']

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

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

  self.time_ended = attributes[:'timeEnded'] if attributes[:'timeEnded']

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

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

  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.error_code = attributes[:'errorCode'] if attributes[:'errorCode']

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

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

  self.error_message = attributes[:'errorMessage'] if attributes[:'errorMessage']

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

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

  self.schedule_instance_key = attributes[:'scheduleInstanceKey'] if attributes[:'scheduleInstanceKey']

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

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

  self.process_key = attributes[:'processKey'] if attributes[:'processKey']

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

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

  self.external_url = attributes[:'externalUrl'] if attributes[:'externalUrl']

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

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

  self.event_key = attributes[:'eventKey'] if attributes[:'eventKey']

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

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

  self.data_entity_key = attributes[:'dataEntityKey'] if attributes[:'dataEntityKey']

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

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

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

Instance Attribute Details

#data_entity_keyString

The key of the associated data entity resource.

Returns:

  • (String)


100
101
102
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 100

def data_entity_key
  @data_entity_key
end

#error_codeString

Error code returned from the job execution or null if job is still running or didn't return an error.

Returns:

  • (String)


73
74
75
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 73

def error_code
  @error_code
end

#error_messageString

Error message returned from the job execution or null if job is still running or didn't return an error.

Returns:

  • (String)


78
79
80
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 78

def error_message
  @error_message
end

#event_keyString

An identifier used for log message correlation.

Returns:

  • (String)


96
97
98
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 96

def event_key
  @event_key
end

#external_urlString

If the job is an external process, then a URL of the job for accessing this resource and its status.

Returns:

  • (String)


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

def external_url
  @external_url
end

#job_typeString

Type of the job execution.

Returns:

  • (String)


50
51
52
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 50

def job_type
  @job_type
end

#lifecycle_stateString

Status of the job execution, such as running, paused, or completed.

Returns:

  • (String)


68
69
70
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 68

def lifecycle_state
  @lifecycle_state
end

#parent_keyString

The unique key of the parent execution or null if this job execution has no parent.

Returns:

  • (String)


54
55
56
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 54

def parent_key
  @parent_key
end

#process_keyString

Process identifier related to the job execution if the job is an external job.

Returns:

  • (String)


86
87
88
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 86

def process_key
  @process_key
end

#propertiesHash<String, Hash<String, String>>

A map of maps that contains the execution context properties which are specific to a job execution. Each job execution may define it's set of required and optional properties. The map keys are category names and the values are maps of property name to property value. Every property is contained inside of a category. Most job executions have required properties within the "default" category. Example: {\"properties\": { \"default\": { \"host\": \"host1\", \"port\": \"1521\", \"database\": \"orcl\"}}}

Returns:

  • (Hash<String, Hash<String, String>>)


109
110
111
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 109

def properties
  @properties
end

#schedule_instance_keyString

The unique key of the triggering external scheduler resource or null if this job execution is not externally triggered.

Returns:

  • (String)


82
83
84
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 82

def schedule_instance_key
  @schedule_instance_key
end

#sub_typeString

Sub-type of this job execution.

Returns:

  • (String)


46
47
48
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 46

def sub_type
  @sub_type
end

#time_endedDateTime

Time that the job execution ended or null if it hasn't yet completed. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


64
65
66
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 64

def time_ended
  @time_ended
end

#time_startedDateTime

Time that job execution started. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


58
59
60
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 58

def time_started
  @time_started
end

Class Method Details

.attribute_mapObject

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



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 112

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'sub_type': :'subType',
    'job_type': :'jobType',
    'parent_key': :'parentKey',
    'time_started': :'timeStarted',
    'time_ended': :'timeEnded',
    'lifecycle_state': :'lifecycleState',
    'error_code': :'errorCode',
    'error_message': :'errorMessage',
    'schedule_instance_key': :'scheduleInstanceKey',
    'process_key': :'processKey',
    'external_url': :'externalUrl',
    'event_key': :'eventKey',
    'data_entity_key': :'dataEntityKey',
    'properties': :'properties'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 134

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'sub_type': :'String',
    'job_type': :'String',
    'parent_key': :'String',
    'time_started': :'DateTime',
    'time_ended': :'DateTime',
    'lifecycle_state': :'String',
    'error_code': :'String',
    'error_message': :'String',
    'schedule_instance_key': :'String',
    'process_key': :'String',
    'external_url': :'String',
    'event_key': :'String',
    'data_entity_key': :'String',
    'properties': :'Hash<String, Hash<String, String>>'
    # 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



285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 285

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

  self.class == other.class &&
    sub_type == other.sub_type &&
    job_type == other.job_type &&
    parent_key == other.parent_key &&
    time_started == other.time_started &&
    time_ended == other.time_ended &&
    lifecycle_state == other.lifecycle_state &&
    error_code == other.error_code &&
    error_message == other.error_message &&
    schedule_instance_key == other.schedule_instance_key &&
    process_key == other.process_key &&
    external_url == other.external_url &&
    event_key == other.event_key &&
    data_entity_key == other.data_entity_key &&
    properties == other.properties
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



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 328

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


308
309
310
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 308

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



317
318
319
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 317

def hash
  [sub_type, job_type, parent_key, time_started, time_ended, lifecycle_state, error_code, error_message, schedule_instance_key, process_key, external_url, event_key, data_entity_key, properties].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



361
362
363
364
365
366
367
368
369
370
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 361

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



355
356
357
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 355

def to_s
  to_hash.to_s
end