Class: Azure::ARM::Scheduler::Models::RetryPolicy
- Inherits:
-
Object
- Object
- Azure::ARM::Scheduler::Models::RetryPolicy
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_scheduler/models/retry_policy.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#retry_count ⇒ Integer
attempted.
-
#retry_interval ⇒ Duration
Gets or sets the retry interval between retries.
-
#retry_type ⇒ RetryType
Possible values include: ‘None’, ‘Fixed’.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ RetryPolicy
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
#retry_count ⇒ Integer
attempted.
24 25 26 |
# File 'lib/azure_mgmt_scheduler/models/retry_policy.rb', line 24 def retry_count @retry_count end |
#retry_interval ⇒ Duration
Returns Gets or sets the retry interval between retries.
20 21 22 |
# File 'lib/azure_mgmt_scheduler/models/retry_policy.rb', line 20 def retry_interval @retry_interval end |
#retry_type ⇒ RetryType
Possible values include: ‘None’, ‘Fixed’
17 18 19 |
# File 'lib/azure_mgmt_scheduler/models/retry_policy.rb', line 17 def retry_type @retry_type end |
Class Method Details
.deserialize_object(object) ⇒ RetryPolicy
Deserializes given Ruby Hash into Model object.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/azure_mgmt_scheduler/models/retry_policy.rb', line 58 def self.deserialize_object(object) return if object.nil? output_object = RetryPolicy.new deserialized_property = object['retryType'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = RetryType.constants.any? { |e| RetryType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum RetryType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.retry_type = deserialized_property deserialized_property = object['retryInterval'] output_object.retry_interval = deserialized_property deserialized_property = object['retryCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.retry_count = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/azure_mgmt_scheduler/models/retry_policy.rb', line 37 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.retry_type output_object['retryType'] = serialized_property unless serialized_property.nil? serialized_property = object.retry_interval output_object['retryInterval'] = serialized_property unless serialized_property.nil? serialized_property = object.retry_count output_object['retryCount'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
29 30 |
# File 'lib/azure_mgmt_scheduler/models/retry_policy.rb', line 29 def validate end |