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.

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



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

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)


66
67
68
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 66

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)


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

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)


44
45
46
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 44

def error_message
  @error_message
end

#event_keyString

An identifier used for log message correlation.

Returns:

  • (String)


62
63
64
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 62

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)


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

def external_url
  @external_url
end

#job_typeString

Type of the job execution.

Returns:

  • (String)


16
17
18
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 16

def job_type
  @job_type
end

#lifecycle_stateString

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

Returns:

  • (String)


34
35
36
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 34

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)


20
21
22
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 20

def parent_key
  @parent_key
end

#process_keyString

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

Returns:

  • (String)


52
53
54
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 52

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>>)


75
76
77
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 75

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)


48
49
50
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 48

def schedule_instance_key
  @schedule_instance_key
end

#sub_typeString

Sub-type of this job execution.

Returns:

  • (String)


12
13
14
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 12

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)


30
31
32
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 30

def time_ended
  @time_ended
end

#time_startedDateTime

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

Returns:

  • (DateTime)


24
25
26
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 24

def time_started
  @time_started
end

Class Method Details

.attribute_mapObject

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



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 78

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.



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

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



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 235

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



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

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


258
259
260
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 258

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



267
268
269
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 267

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



311
312
313
314
315
316
317
318
319
320
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 311

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



305
306
307
# File 'lib/oci/data_catalog/models/create_job_execution_details.rb', line 305

def to_s
  to_hash.to_s
end