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_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.
-
#run_duration_in_milliseconds ⇒ Integer
The duration of the run in milliseconds.
-
#time_created ⇒ DateTime
[Required] The date and time a application was created, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format.
-
#time_updated ⇒ DateTime
[Required] The date and time a application was updated, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) 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
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 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 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 219 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.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.
41 42 43 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 41 def application_id @application_id end |
#compartment_id ⇒ String
[Required] The OCID of a compartment.
46 47 48 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 46 def compartment_id @compartment_id end |
#data_read_in_bytes ⇒ Integer
The data read by the run in bytes.
51 52 53 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 51 def data_read_in_bytes @data_read_in_bytes end |
#data_written_in_bytes ⇒ Integer
The data written by the run in bytes.
56 57 58 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 56 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](docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: ‘{"CostCenter": "42"}`
62 63 64 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 62 def @defined_tags end |
#display_name ⇒ String
A user-friendly name. This name is not necessarily unique.
67 68 69 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 67 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](docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: ‘"Finance"`
74 75 76 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 74 def @freeform_tags end |
#id ⇒ String
[Required] The ID of a run.
79 80 81 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 79 def id @id end |
#language ⇒ String
[Required] The Spark language.
84 85 86 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 84 def language @language end |
#lifecycle_details ⇒ String
The detailed messages about the lifecycle state.
89 90 91 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 89 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of this run.
94 95 96 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 94 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.
100 101 102 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 100 def opc_request_id @opc_request_id end |
#owner_principal_id ⇒ String
The OCID of the user who created the resource.
105 106 107 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 105 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.
111 112 113 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 111 def owner_user_name @owner_user_name end |
#run_duration_in_milliseconds ⇒ Integer
The duration of the run in milliseconds.
116 117 118 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 116 def run_duration_in_milliseconds @run_duration_in_milliseconds end |
#time_created ⇒ DateTime
[Required] The date and time a application was created, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format. Example: 2018-04-03T21:10:29.600Z
127 128 129 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 127 def time_created @time_created end |
#time_updated ⇒ DateTime
[Required] The date and time a application was updated, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format. Example: 2018-04-03T21:10:29.600Z
133 134 135 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 133 def time_updated @time_updated end |
#total_o_cpu ⇒ Integer
The total number of oCPU requested by the run.
121 122 123 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 121 def total_o_cpu @total_o_cpu end |
#type ⇒ String
The Spark application processing type.
138 139 140 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 138 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 141 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', '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.
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 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 168 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', '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.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 375 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 && 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
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 423 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
403 404 405 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 403 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
412 413 414 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 412 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, 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
456 457 458 459 460 461 462 463 464 465 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 456 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
450 451 452 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 450 def to_s to_hash.to_s end |