# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Redis module Models # # Parameters describing a redis instance # class RedisReadableProperties < RedisProperties include MsRestAzure # @return [String] Redis instance provisioning status attr_accessor :provisioning_state # @return [String] Redis host name attr_accessor :host_name # @return [Integer] Redis non-ssl port attr_accessor :port # @return [Integer] Redis ssl port attr_accessor :ssl_port # # Validate the object. Throws ValidationError if validation fails. # def validate # Nothing to validate end # # Serializes given Model object into Ruby Hash. # @param object Model object to serialize. # @return [Hash] Serialized object in form of Ruby Hash. # def self.serialize_object(object) object.validate output_object = {} serialized_property = object.sku unless serialized_property.nil? serialized_property = Sku.serialize_object(serialized_property) end output_object['sku'] = serialized_property unless serialized_property.nil? serialized_property = object.redis_version output_object['redisVersion'] = serialized_property unless serialized_property.nil? serialized_property = object.redis_configuration output_object['redisConfiguration'] = serialized_property unless serialized_property.nil? serialized_property = object.enable_non_ssl_port output_object['enableNonSslPort'] = serialized_property unless serialized_property.nil? serialized_property = object.tenant_settings output_object['tenantSettings'] = serialized_property unless serialized_property.nil? serialized_property = object.shard_count output_object['shardCount'] = serialized_property unless serialized_property.nil? serialized_property = object.virtual_network output_object['virtualNetwork'] = serialized_property unless serialized_property.nil? serialized_property = object.subnet output_object['subnet'] = serialized_property unless serialized_property.nil? serialized_property = object.static_ip output_object['staticIP'] = serialized_property unless serialized_property.nil? serialized_property = object.provisioning_state output_object['provisioningState'] = serialized_property unless serialized_property.nil? serialized_property = object.host_name output_object['hostName'] = serialized_property unless serialized_property.nil? serialized_property = object.port output_object['port'] = serialized_property unless serialized_property.nil? serialized_property = object.ssl_port output_object['sslPort'] = serialized_property unless serialized_property.nil? output_object end # # Deserializes given Ruby Hash into Model object. # @param object [Hash] Ruby Hash object to deserialize. # @return [RedisReadableProperties] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = RedisReadableProperties.new deserialized_property = object['sku'] unless deserialized_property.nil? deserialized_property = Sku.deserialize_object(deserialized_property) end output_object.sku = deserialized_property deserialized_property = object['redisVersion'] output_object.redis_version = deserialized_property deserialized_property = object['redisConfiguration'] output_object.redis_configuration = deserialized_property deserialized_property = object['enableNonSslPort'] output_object.enable_non_ssl_port = deserialized_property deserialized_property = object['tenantSettings'] output_object.tenant_settings = deserialized_property deserialized_property = object['shardCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.shard_count = deserialized_property deserialized_property = object['virtualNetwork'] output_object.virtual_network = deserialized_property deserialized_property = object['subnet'] output_object.subnet = deserialized_property deserialized_property = object['staticIP'] output_object.static_ip = deserialized_property deserialized_property = object['provisioningState'] output_object.provisioning_state = deserialized_property deserialized_property = object['hostName'] output_object.host_name = deserialized_property deserialized_property = object['port'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.port = deserialized_property deserialized_property = object['sslPort'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.ssl_port = deserialized_property output_object end end end end