Class: Azure::ARM::Redis::Models::RedisRebootParameters
- Inherits:
-
Object
- Object
- Azure::ARM::Redis::Models::RedisRebootParameters
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_redis/models/redis_reboot_parameters.rb
Overview
Specifies which redis node(s) to reboot.
Instance Attribute Summary collapse
-
#reboot_type ⇒ RebootType
value data loss is possible.
-
#shard_id ⇒ Integer
which should be rebooted.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ RedisRebootParameters
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
#reboot_type ⇒ RebootType
value data loss is possible. Possible values include: ‘PrimaryNode’, ‘SecondaryNode’, ‘AllNodes’
18 19 20 |
# File 'lib/azure_mgmt_redis/models/redis_reboot_parameters.rb', line 18 def reboot_type @reboot_type end |
#shard_id ⇒ Integer
which should be rebooted.
22 23 24 |
# File 'lib/azure_mgmt_redis/models/redis_reboot_parameters.rb', line 22 def shard_id @shard_id end |
Class Method Details
.deserialize_object(object) ⇒ RedisRebootParameters
Deserializes given Ruby Hash into Model object.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/azure_mgmt_redis/models/redis_reboot_parameters.rb', line 54 def self.deserialize_object(object) return if object.nil? output_object = RedisRebootParameters.new deserialized_property = object['rebootType'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = RebootType.constants.any? { |e| RebootType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum RebootType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.reboot_type = deserialized_property deserialized_property = object['shardId'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.shard_id = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/azure_mgmt_redis/models/redis_reboot_parameters.rb', line 36 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.reboot_type output_object['rebootType'] = serialized_property unless serialized_property.nil? serialized_property = object.shard_id output_object['shardId'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
27 28 29 |
# File 'lib/azure_mgmt_redis/models/redis_reboot_parameters.rb', line 27 def validate fail MsRest::ValidationError, 'property reboot_type is nil' if @reboot_type.nil? end |