Class: Azure::ARM::Scheduler::Models::JobStatus

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_scheduler/models/job_status.rb

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#execution_countInteger

Returns Gets the number of times this job has executed.

Returns:

  • (Integer)

    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_countInteger

Returns Gets the number of times this job has failed.

Returns:

  • (Integer)

    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_countInteger

that were retried and failed as many times as the retry policy states).

Returns:

  • (Integer)

    Gets the number of faulted occurrences (occurrences



24
25
26
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 24

def faulted_count
  @faulted_count
end

#last_execution_timeDateTime

ISO-8601 format. Could be empty if job has not run yet.

Returns:

  • (DateTime)

    Gets the time the last occurrence executed in



28
29
30
# File 'lib/azure_mgmt_scheduler/models/job_status.rb', line 28

def last_execution_time
  @last_execution_time
end

#next_execution_timeDateTime

format. Could be empty if the job is completed.

Returns:

  • (DateTime)

    Gets the time of the next occurrence in ISO-8601



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.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of 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

#validateObject

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