# 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::Web module Models # # Model object. # class NetworkFeaturesProperties include MsRestAzure # @return [String] The Vnet Name attr_accessor :virtual_network_name # @return [VnetInfo] The Vnet Summary view attr_accessor :virtual_network_connection # @return [Array] The Hybrid Connections # Summary view attr_accessor :hybrid_connections # # Validate the object. Throws ValidationError if validation fails. # def validate @virtual_network_connection.validate unless @virtual_network_connection.nil? @hybrid_connections.each{ |e| e.validate if e.respond_to?(:validate) } unless @hybrid_connections.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.virtual_network_name output_object['virtualNetworkName'] = serialized_property unless serialized_property.nil? serialized_property = object.virtual_network_connection unless serialized_property.nil? serialized_property = VnetInfo.serialize_object(serialized_property) end output_object['virtualNetworkConnection'] = serialized_property unless serialized_property.nil? serialized_property = object.hybrid_connections unless serialized_property.nil? serializedArray = [] serialized_property.each do |element| unless element.nil? element = RelayServiceConnectionEntity.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['hybridConnections'] = 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 [NetworkFeaturesProperties] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = NetworkFeaturesProperties.new deserialized_property = object['virtualNetworkName'] output_object.virtual_network_name = deserialized_property deserialized_property = object['virtualNetworkConnection'] unless deserialized_property.nil? deserialized_property = VnetInfo.deserialize_object(deserialized_property) end output_object.virtual_network_connection = deserialized_property deserialized_property = object['hybridConnections'] unless deserialized_property.nil? deserialized_array = [] deserialized_property.each do |element1| unless element1.nil? element1 = RelayServiceConnectionEntity.deserialize_object(element1) end deserialized_array.push(element1) end deserialized_property = deserialized_array end output_object.hybrid_connections = deserialized_property output_object end end end end