Class: OCI::DataFlow::Models::RunSummary
- Inherits:
-
Object
- Object
- OCI::DataFlow::Models::RunSummary
- Defined in:
- lib/oci/data_flow/models/run_summary.rb
Overview
A summary of the run.
Constant Summary collapse
- LANGUAGE_ENUM =
[ LANGUAGE_SCALA = 'SCALA'.freeze, LANGUAGE_JAVA = 'JAVA'.freeze, LANGUAGE_PYTHON = 'PYTHON'.freeze, LANGUAGE_SQL = 'SQL'.freeze, LANGUAGE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_ACCEPTED = 'ACCEPTED'.freeze, LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFECYCLE_STATE_CANCELING = 'CANCELING'.freeze, LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze, LIFECYCLE_STATE_STOPPING = 'STOPPING'.freeze, LIFECYCLE_STATE_STOPPED = 'STOPPED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- TYPE_ENUM =
[ TYPE_BATCH = 'BATCH'.freeze, TYPE_STREAMING = 'STREAMING'.freeze, TYPE_SESSION = 'SESSION'.freeze, TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#application_id ⇒ String
[Required] The application ID.
-
#compartment_id ⇒ String
[Required] The OCID of a compartment.
-
#data_read_in_bytes ⇒ Integer
The data read by the run in bytes.
-
#data_written_in_bytes ⇒ Integer
The data written by the run in bytes.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource.
-
#display_name ⇒ String
A user-friendly name.
-
#freeform_tags ⇒ Hash<String, String>
[Required] Free-form tags for this resource.
-
#id ⇒ String
[Required] The ID of a run.
-
#language ⇒ String
[Required] The Spark language.
-
#lifecycle_details ⇒ String
The detailed messages about the lifecycle state.
-
#lifecycle_state ⇒ String
[Required] The current state of this run.
-
#opc_request_id ⇒ String
Unique Oracle assigned identifier for the request.
-
#owner_principal_id ⇒ String
The OCID of the user who created the resource.
-
#owner_user_name ⇒ String
The username of the user who created the resource.
-
#pool_id ⇒ String
The OCID of a pool.
-
#run_duration_in_milliseconds ⇒ Integer
The duration of the run in milliseconds.
-
#time_created ⇒ DateTime
[Required] The date and time the resource was created, expressed in RFC 3339 timestamp format.
-
#time_updated ⇒ DateTime
[Required] The date and time the resource was updated, expressed in RFC 3339 timestamp format.
-
#total_o_cpu ⇒ Integer
The total number of oCPU requested by the run.
-
#type ⇒ String
The Spark application processing type.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ RunSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ RunSummary
Initializes the object
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 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 229 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.application_id = attributes[:'applicationId'] if attributes[:'applicationId'] raise 'You cannot provide both :applicationId and :application_id' if attributes.key?(:'applicationId') && attributes.key?(:'application_id') self.application_id = attributes[:'application_id'] if attributes[:'application_id'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.data_read_in_bytes = attributes[:'dataReadInBytes'] if attributes[:'dataReadInBytes'] raise 'You cannot provide both :dataReadInBytes and :data_read_in_bytes' if attributes.key?(:'dataReadInBytes') && attributes.key?(:'data_read_in_bytes') self.data_read_in_bytes = attributes[:'data_read_in_bytes'] if attributes[:'data_read_in_bytes'] self.data_written_in_bytes = attributes[:'dataWrittenInBytes'] if attributes[:'dataWrittenInBytes'] raise 'You cannot provide both :dataWrittenInBytes and :data_written_in_bytes' if attributes.key?(:'dataWrittenInBytes') && attributes.key?(:'data_written_in_bytes') self.data_written_in_bytes = attributes[:'data_written_in_bytes'] if attributes[:'data_written_in_bytes'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] 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. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self.id = attributes[:'id'] if attributes[:'id'] self.language = attributes[:'language'] if attributes[:'language'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] 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.opc_request_id = attributes[:'opcRequestId'] if attributes[:'opcRequestId'] raise 'You cannot provide both :opcRequestId and :opc_request_id' if attributes.key?(:'opcRequestId') && attributes.key?(:'opc_request_id') self.opc_request_id = attributes[:'opc_request_id'] if attributes[:'opc_request_id'] self.owner_principal_id = attributes[:'ownerPrincipalId'] if attributes[:'ownerPrincipalId'] raise 'You cannot provide both :ownerPrincipalId and :owner_principal_id' if attributes.key?(:'ownerPrincipalId') && attributes.key?(:'owner_principal_id') self.owner_principal_id = attributes[:'owner_principal_id'] if attributes[:'owner_principal_id'] self.owner_user_name = attributes[:'ownerUserName'] if attributes[:'ownerUserName'] raise 'You cannot provide both :ownerUserName and :owner_user_name' if attributes.key?(:'ownerUserName') && attributes.key?(:'owner_user_name') self.owner_user_name = attributes[:'owner_user_name'] if attributes[:'owner_user_name'] self.pool_id = attributes[:'poolId'] if attributes[:'poolId'] raise 'You cannot provide both :poolId and :pool_id' if attributes.key?(:'poolId') && attributes.key?(:'pool_id') self.pool_id = attributes[:'pool_id'] if attributes[:'pool_id'] self.run_duration_in_milliseconds = attributes[:'runDurationInMilliseconds'] if attributes[:'runDurationInMilliseconds'] raise 'You cannot provide both :runDurationInMilliseconds and :run_duration_in_milliseconds' if attributes.key?(:'runDurationInMilliseconds') && attributes.key?(:'run_duration_in_milliseconds') self.run_duration_in_milliseconds = attributes[:'run_duration_in_milliseconds'] if attributes[:'run_duration_in_milliseconds'] self.total_o_cpu = attributes[:'totalOCpu'] if attributes[:'totalOCpu'] raise 'You cannot provide both :totalOCpu and :total_o_cpu' if attributes.key?(:'totalOCpu') && attributes.key?(:'total_o_cpu') self.total_o_cpu = attributes[:'total_o_cpu'] if attributes[:'total_o_cpu'] 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.type = attributes[:'type'] if attributes[:'type'] self.type = "BATCH" if type.nil? && !attributes.key?(:'type') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#application_id ⇒ String
[Required] The application ID.
43 44 45 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 43 def application_id @application_id end |
#compartment_id ⇒ String
[Required] The OCID of a compartment.
48 49 50 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 48 def compartment_id @compartment_id end |
#data_read_in_bytes ⇒ Integer
The data read by the run in bytes.
53 54 55 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 53 def data_read_in_bytes @data_read_in_bytes end |
#data_written_in_bytes ⇒ Integer
The data written by the run in bytes.
58 59 60 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 58 def data_written_in_bytes @data_written_in_bytes end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {\"Operations\": {\"CostCenter\": \"42\"}}
64 65 66 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 64 def @defined_tags end |
#display_name ⇒ String
A user-friendly name. This name is not necessarily unique.
69 70 71 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 69 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
[Required] Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}
76 77 78 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 76 def @freeform_tags end |
#id ⇒ String
[Required] The ID of a run.
81 82 83 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 81 def id @id end |
#language ⇒ String
[Required] The Spark language.
86 87 88 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 86 def language @language end |
#lifecycle_details ⇒ String
The detailed messages about the lifecycle state.
91 92 93 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 91 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of this run.
96 97 98 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 96 def lifecycle_state @lifecycle_state end |
#opc_request_id ⇒ String
Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
102 103 104 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 102 def opc_request_id @opc_request_id end |
#owner_principal_id ⇒ String
The OCID of the user who created the resource.
107 108 109 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 107 def owner_principal_id @owner_principal_id end |
#owner_user_name ⇒ String
The username of the user who created the resource. If the username of the owner does not exist, null
will be returned and the caller should refer to the ownerPrincipalId value instead.
113 114 115 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 113 def owner_user_name @owner_user_name end |
#pool_id ⇒ String
The OCID of a pool. Unique Id to indentify a dataflow pool resource.
118 119 120 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 118 def pool_id @pool_id end |
#run_duration_in_milliseconds ⇒ Integer
The duration of the run in milliseconds.
123 124 125 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 123 def run_duration_in_milliseconds @run_duration_in_milliseconds end |
#time_created ⇒ DateTime
[Required] The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
134 135 136 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 134 def time_created @time_created end |
#time_updated ⇒ DateTime
[Required] The date and time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2018-04-03T21:10:29.600Z
140 141 142 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 140 def time_updated @time_updated end |
#total_o_cpu ⇒ Integer
The total number of oCPU requested by the run.
128 129 130 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 128 def total_o_cpu @total_o_cpu end |
#type ⇒ String
The Spark application processing type.
145 146 147 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 145 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 148 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'application_id': :'applicationId', 'compartment_id': :'compartmentId', 'data_read_in_bytes': :'dataReadInBytes', 'data_written_in_bytes': :'dataWrittenInBytes', 'defined_tags': :'definedTags', 'display_name': :'displayName', 'freeform_tags': :'freeformTags', 'id': :'id', 'language': :'language', 'lifecycle_details': :'lifecycleDetails', 'lifecycle_state': :'lifecycleState', 'opc_request_id': :'opcRequestId', 'owner_principal_id': :'ownerPrincipalId', 'owner_user_name': :'ownerUserName', 'pool_id': :'poolId', 'run_duration_in_milliseconds': :'runDurationInMilliseconds', 'total_o_cpu': :'totalOCpu', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'type': :'type' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 176 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'application_id': :'String', 'compartment_id': :'String', 'data_read_in_bytes': :'Integer', 'data_written_in_bytes': :'Integer', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'display_name': :'String', 'freeform_tags': :'Hash<String, String>', 'id': :'String', 'language': :'String', 'lifecycle_details': :'String', 'lifecycle_state': :'String', 'opc_request_id': :'String', 'owner_principal_id': :'String', 'owner_user_name': :'String', 'pool_id': :'String', 'run_duration_in_milliseconds': :'Integer', 'total_o_cpu': :'Integer', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 391 def ==(other) return true if equal?(other) self.class == other.class && application_id == other.application_id && compartment_id == other.compartment_id && data_read_in_bytes == other.data_read_in_bytes && data_written_in_bytes == other.data_written_in_bytes && == other. && display_name == other.display_name && == other. && id == other.id && language == other.language && lifecycle_details == other.lifecycle_details && lifecycle_state == other.lifecycle_state && opc_request_id == other.opc_request_id && owner_principal_id == other.owner_principal_id && owner_user_name == other.owner_user_name && pool_id == other.pool_id && run_duration_in_milliseconds == other.run_duration_in_milliseconds && total_o_cpu == other.total_o_cpu && time_created == other.time_created && time_updated == other.time_updated && type == other.type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 440 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
420 421 422 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 420 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
429 430 431 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 429 def hash [application_id, compartment_id, data_read_in_bytes, data_written_in_bytes, , display_name, , id, language, lifecycle_details, lifecycle_state, opc_request_id, owner_principal_id, owner_user_name, pool_id, run_duration_in_milliseconds, total_o_cpu, time_created, time_updated, type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
473 474 475 476 477 478 479 480 481 482 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 473 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_s ⇒ String
Returns the string representation of the object
467 468 469 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 467 def to_s to_hash.to_s end |