Class: Azure::ARM::Scheduler::Models::JobMaxRecurrence
- Inherits:
-
Object
- Object
- Azure::ARM::Scheduler::Models::JobMaxRecurrence
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_scheduler/models/job_max_recurrence.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#frequency ⇒ RecurrenceFrequency
(second, minute, hour, day, week, month).
-
#interval ⇒ Integer
Gets or sets the interval between retries.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ JobMaxRecurrence
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
#frequency ⇒ RecurrenceFrequency
(second, minute, hour, day, week, month). Possible values include: ‘Minute’, ‘Hour’, ‘Day’, ‘Week’, ‘Month’
18 19 20 |
# File 'lib/azure_mgmt_scheduler/models/job_max_recurrence.rb', line 18 def frequency @frequency end |
#interval ⇒ Integer
Returns Gets or sets the interval between retries.
21 22 23 |
# File 'lib/azure_mgmt_scheduler/models/job_max_recurrence.rb', line 21 def interval @interval end |
Class Method Details
.deserialize_object(object) ⇒ JobMaxRecurrence
Deserializes given Ruby Hash into Model object.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/azure_mgmt_scheduler/models/job_max_recurrence.rb', line 52 def self.deserialize_object(object) return if object.nil? output_object = JobMaxRecurrence.new deserialized_property = object['frequency'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = RecurrenceFrequency.constants.any? { |e| RecurrenceFrequency.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum RecurrenceFrequency does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.frequency = deserialized_property deserialized_property = object['interval'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.interval = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/azure_mgmt_scheduler/models/job_max_recurrence.rb', line 34 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.frequency output_object['frequency'] = serialized_property unless serialized_property.nil? serialized_property = object.interval output_object['interval'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
26 27 |
# File 'lib/azure_mgmt_scheduler/models/job_max_recurrence.rb', line 26 def validate end |