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_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.
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
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 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 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 203 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'] end |
Instance Attribute Details
#application_id ⇒ String
[Required] The application ID.
33 34 35 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 33 def application_id @application_id end |
#compartment_id ⇒ String
[Required] The OCID of a compartment.
38 39 40 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 38 def compartment_id @compartment_id end |
#data_read_in_bytes ⇒ Integer
The data read by the run in bytes.
43 44 45 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 43 def data_read_in_bytes @data_read_in_bytes end |
#data_written_in_bytes ⇒ Integer
The data written by the run in bytes.
48 49 50 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 48 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"}`
54 55 56 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 54 def @defined_tags end |
#display_name ⇒ String
A user-friendly name. This name is not necessarily unique.
59 60 61 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 59 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"`
66 67 68 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 66 def @freeform_tags end |
#id ⇒ String
[Required] The ID of a run.
71 72 73 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 71 def id @id end |
#language ⇒ String
[Required] The Spark language.
76 77 78 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 76 def language @language end |
#lifecycle_details ⇒ String
The detailed messages about the lifecycle state.
81 82 83 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 81 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of this run.
86 87 88 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 86 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.
92 93 94 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 92 def opc_request_id @opc_request_id end |
#owner_principal_id ⇒ String
The OCID of the user who created the resource.
97 98 99 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 97 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.
103 104 105 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 103 def owner_user_name @owner_user_name end |
#run_duration_in_milliseconds ⇒ Integer
The duration of the run in milliseconds.
108 109 110 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 108 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`
119 120 121 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 119 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`
125 126 127 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 125 def time_updated @time_updated end |
#total_o_cpu ⇒ Integer
The total number of oCPU requested by the run.
113 114 115 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 113 def total_o_cpu @total_o_cpu end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 128 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 154 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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 343 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 390 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
370 371 372 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 370 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
379 380 381 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 379 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].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
423 424 425 426 427 428 429 430 431 432 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 423 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
417 418 419 |
# File 'lib/oci/data_flow/models/run_summary.rb', line 417 def to_s to_hash.to_s end |