# 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 # # Describes main public ip address and any extra vips # class AddressResponse include MsRestAzure # @return [String] Main public vip attr_accessor :service_ip_address # @return [String] VNET internal ip address of the hostingEnvironment # (App Service Environment) if it is in internal load-balancing mode attr_accessor :internal_ip_address # @return [Array] IP addresses appearing on outbound connections attr_accessor :outbound_ip_addresses # @return [Array] Additional vips attr_accessor :vip_mappings # # Validate the object. Throws ValidationError if validation fails. # def validate @outbound_ip_addresses.each{ |e| e.validate if e.respond_to?(:validate) } unless @outbound_ip_addresses.nil? @vip_mappings.each{ |e| e.validate if e.respond_to?(:validate) } unless @vip_mappings.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.service_ip_address output_object['serviceIpAddress'] = serialized_property unless serialized_property.nil? serialized_property = object.internal_ip_address output_object['internalIpAddress'] = serialized_property unless serialized_property.nil? serialized_property = object.outbound_ip_addresses output_object['outboundIpAddresses'] = serialized_property unless serialized_property.nil? serialized_property = object.vip_mappings unless serialized_property.nil? serializedArray = [] serialized_property.each do |element1| unless element1.nil? element1 = VirtualIPMapping.serialize_object(element1) end serializedArray.push(element1) end serialized_property = serializedArray end output_object['vipMappings'] = 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 [AddressResponse] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = AddressResponse.new deserialized_property = object['serviceIpAddress'] output_object.service_ip_address = deserialized_property deserialized_property = object['internalIpAddress'] output_object.internal_ip_address = deserialized_property deserialized_property = object['outboundIpAddresses'] output_object.outbound_ip_addresses = deserialized_property deserialized_property = object['vipMappings'] unless deserialized_property.nil? deserialized_array = [] deserialized_property.each do |element3| unless element3.nil? element3 = VirtualIPMapping.deserialize_object(element3) end deserialized_array.push(element3) end deserialized_property = deserialized_array end output_object.vip_mappings = deserialized_property output_object end end end end