def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_object_value("autonomousSystem", self.autonomous_system)
        writer.write_str_value("countryOrRegion", self.country_or_region)
        writer.write_str_value("hostingProvider", self.hosting_provider)
        writer.write_str_value("netblock", self.netblock)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/security/ip_address.py