Class: Azure::ARM::Scheduler::Models::JobStatus
- Inherits:
-
Object
- Object
- Azure::ARM::Scheduler::Models::JobStatus
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_scheduler/models/job_status.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#execution_count ⇒ Integer
Gets the number of times this job has executed.
-
#failure_count ⇒ Integer
Gets the number of times this job has failed.
-
#faulted_count ⇒ Integer
that were retried and failed as many times as the retry policy states).
-
#last_execution_time ⇒ DateTime
ISO-8601 format.
-
#next_execution_time ⇒ DateTime
format.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ JobStatus
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#execution_count ⇒ Integer
Returns Gets the number of times this job has executed.
16 17 18 |
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 16 def execution_count @execution_count end |
#failure_count ⇒ Integer
Returns Gets the number of times this job has failed.
19 20 21 |
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 19 def failure_count @failure_count end |
#faulted_count ⇒ Integer
that were retried and failed as many times as the retry policy states).
24 25 26 |
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 24 def faulted_count @faulted_count end |
#last_execution_time ⇒ DateTime
ISO-8601 format. Could be empty if job has not run yet.
28 29 30 |
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 28 def last_execution_time @last_execution_time end |
#next_execution_time ⇒ DateTime
format. Could be empty if the job is completed.
32 33 34 |
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 32 def next_execution_time @next_execution_time end |
Class Method Details
.deserialize_object(object) ⇒ JobStatus
Deserializes given Ruby Hash into Model object.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 75 def self.deserialize_object(object) return if object.nil? output_object = JobStatus.new deserialized_property = object['executionCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.execution_count = deserialized_property deserialized_property = object['failureCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.failure_count = deserialized_property deserialized_property = object['faultedCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.faulted_count = deserialized_property deserialized_property = object['lastExecutionTime'] deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty? output_object.last_execution_time = deserialized_property deserialized_property = object['nextExecutionTime'] deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty? output_object.next_execution_time = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 46 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.execution_count output_object['executionCount'] = serialized_property unless serialized_property.nil? serialized_property = object.failure_count output_object['failureCount'] = serialized_property unless serialized_property.nil? serialized_property = object.faulted_count output_object['faultedCount'] = serialized_property unless serialized_property.nil? serialized_property = object.last_execution_time serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ') output_object['lastExecutionTime'] = serialized_property unless serialized_property.nil? serialized_property = object.next_execution_time serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ') output_object['nextExecutionTime'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
37 38 39 |
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 37 def validate # Nothing to validate end |