# 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::Search module Models # # Defines properties of an Azure Search service that can be modified. # class SearchServiceProperties include MsRestAzure # @return [Sku] Gets or sets the SKU of the Search Service, which # determines price tier and capacity limits. attr_accessor :sku # @return [Integer] Gets or sets the number of replicas in the Search # service. If specified, it must be a value between 1 and 6 inclusive. attr_accessor :replica_count # @return [Integer] Gets or sets the number of partitions in the Search # service; if specified, it can be 1, 2, 3, 4, 6, or 12. attr_accessor :partition_count # # Validate the object. Throws ValidationError if validation fails. # def validate @sku.validate unless @sku.nil? 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.replica_count output_object['replicaCount'] = serialized_property unless serialized_property.nil? serialized_property = object.partition_count output_object['partitionCount'] = 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 [SearchServiceProperties] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = SearchServiceProperties.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['replicaCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.replica_count = deserialized_property deserialized_property = object['partitionCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.partition_count = deserialized_property output_object end end end end